For those of you who don’t know what WordPress Multisites are, here is the description from WordPress.org
“A multisite network can be very similar to your own personal version of WordPress.com. End users of your network can create their own sites on demand, just like end users of WordPress.com can create blogs on demand. If you do not have any need to allow end users to create their own sites on demand, you can create a multisite network in which only you, the administrator, can add new sites.”
Setting up a multisite is pretty straight forward, below we list the steps to get your Multisite setup up and running using subdomains on a cPanel server.
Login to cPanel (yourwebsite.com/cpanel). Click on subdomains and add one with an asterix.
Now you need to enable the multisite feature in your WordPress install, do this by simply pasting the following code into your wp-config.php file.
define('WP_ALLOW_MULTISITE', true);
Now, login to your WordPress dashboard and go to Tools > Network (yourwebsite.com/wp-admin/network.php). You will then be taken through the steps to to set up your new multisite blog.
Then, add a directory named “blogs.dir” to the “wp-content” directory on your server. It should look something like this: /public_html/wp-content/blogs.dir
The CHMOD write permissions should be 755 to allow the server to write to that directory. To check/change the current CHMOD settings of the directory, find the directory on your server using an FTP client, right click on it and check whether the permissions number is 755, if not change it and click ok.
Next, the install instructions should tell you to add some more code to your wp-config.php file. It should look something like this:
define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); $base = '/'; define( 'DOMAIN_CURRENT_SITE', 'yourwebsite.com' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 );
The install instructions will now tell you to add some code to your .htaccess file. It should look something like this:
RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L]
If you are not familiar with the .htaccess file, it is a directory-level configuration file that contains rules to help control your website. To edit the .htaccess file, open Notepad as an administrator, click open and search for the file.
You are done, start adding some sites to your install 🙂