Force WordPress network to use sub-directories

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.

Incoming search terms:

  • allow_subdirectory_install

Leave a Reply