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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>