Site icon SumTips

How to Enable Multisite Feature in WordPress 3.1

This tutorial will show how you can enable the multisite feature in WordPress 3.1. This feature is used when you want to run multiple sites from one install of WordPress without having to actually create many separate installs on the same server.

Steps to enable multisite feature in WordPress 3.2 is similar to WordPress 3.1. You can follow the steps below for that as well.

If you want to install WordPress on a new subdomain, check out that post instead.

Backup up your database, wp-config.php and .htaccess files before beginning to revert incase you have any error.

First open wp-config.php located in the root folder of your WordPress blog directory. Add the below line to it and save.

define('WP_ALLOW_MULTISITE', true);

Make sure to add it above the line that says: /* That's all, stop editing! Happy blogging. */

The Network option, which is disabled by default, is enabled now. Go to the admin area of WordPress and you’ll see the menu item under Tools. Click on it!

Now you should see a screen like this:

Before you begin installation, decide what format you want?


After making your choice, also set a name for your network and an admin e-mail address.

Once everything is complete, clicking “Install” will set up the extra network tables in the database and take you to a screen like the one below.

Now you will again need to open your wp-config.php file and paste in the code that looks like the following:

define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', '' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

Paste it right under where you put the first code earlier.

Next open your .htaccess file, located in the same directory, and add the next set of code in it by replacing any existing WordPress rewrite rules. The code you get, something like below, depends on if it is a subdomain or a subfolder.

Subdomain .htaccess rules

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ [L]
# uploaded files
RewriteRule ^files/(.+) wpincludes/msfiles.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} f [OR]
RewriteRule ^ [L]
RewriteRule . index.php [L]

Subfolder .htaccess rules.

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ [L]
# uploaded files
RewriteRule ^([_09azAZ]+/)? files/(.+) wpincludes/msfiles.php?file=$2 [L]
# add a trailing slash to /wpadmin
RewriteRule ^([_09azAZ]+/)? wpadmin$ $1wpadmin/[R=301,L]
RewriteCond %{REQUEST_FILENAME} f [OR]
RewriteRule ^ [L]
RewriteRule ^([_09azAZ]+/)?(wp(content|admin|includes).*) $2 [L]
RewriteRule ^([_09azAZ]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

If you have previously modified .htaccess file then make sure you don’t erase those changes. Place the code you get only between # BEGIN WordPress and # END WordPress.

Also create a new directory named “blogs.dir” under wp-content. This directory will contain uploaded media files from your different sites in the network.

Almost done now, login again using the link given at the bottom of the same screen.

If all goes well, you should now see a new “Network Admin” link on the left of the “Log Out” link.

Clicking on that will take you to the new Network Admin dashboard.

Your entire network of different sites are managed from here. You can add new users, themes, plugins and make other changes from the dashboard.

That’s it! You have successfully enabled multisite feature in WordPress.

Exit mobile version