Tag Archives: wordpress

allow-hyphen-in-blog-name-multisite-wordpress

Allow WordPress Multisite to Have Hyphens in Blog Name


So, wordpress multisite does not allow you to have hyphens in your blog names automatically, I don’t know why, but that is how it is. After some googling I found a solution. (see below for credit)
All you have to do is:
grab “ms-functions.php” out of the wp-includes folder.
on or around line 652 add a hyphen after the 9, so change:
preg_match( '/[a-z0-9]+/', $blogname, $maybe );
to
preg_match( '/[a-z0-9-]+/', $blogname, $maybe );
Originally got this from the following forum thread:
http://premium.wpmudev.org/forums/topic/allowing-hyphens-in-blog-names
thanks TonyV