How To Setup Multisite/Network in WordPress

WordPress v3.0 allows you to host multiple sites in a single install (previously MU).  I followed the instructions on how to set this up following the WordPress documentation:

However, for some reason, these instructions did not work on a sub-directory install.  I got the following message after hitting the “network” link in the Tools dashboard:

Because your install is not new, the sites in your WordPress network must use sub-domains

I had to follow these instructions to finally get it to work:

In WordPress 3.0, we have the ability to create a network of sites. But if your install is over 1 month old, the sites in your WordPress network must use sub-domains because of permalink problems with “/blog/” from the main site. This is how you can force the sites in your WordPress network to use sub-directories during the Network installation process.

Add the following lines to your current activated WordPress Theme’s template file, preferably your Theme’s template functions.php file:

add_filter( 'allow_subdirectory_install',
	create_function( '', 'return true;' )

You can remove the lines above once you done enabling the Network feature.

Creating this into a plugin is not an option, since all plugins are required to be deactivated before enabling the Network feature. Please read on how to Create A Network in the WordPress Codex and ticket #12931 for more information on why it is block by default.