11 May 2010

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.

While WordPress network is capable of using sub-directories, were you aware that you could also utilize sub directories on a Network to observe cctv cameras? You can. Even wireless cameras are capable of being viewed over a network. For more information, browse the previous websites.