Ever since WordPress 3.0 there has been the hidden option of turning your blog into a Multi-Site WordPress installation. It’s not something most blogs really require and it’s certainly not for the faint of heart. It is however, something that can be truly useful for websites that want to split their content into individual channels.
Before you think about converting your blog into a multi-site installation you should carefully consider why you want to do it. It will involve a little technical work to setup and maintenance is a little more involved than using a single blog.
If it’s something you want to do though, let’s discuss the process.
Why Would You Use Multi-Site?
As I briefly mentioned, there are a number of reasons that you would convert your website from a single blog to a multi-site website.
It’s a great way to allow teams and/or employees from your company to have their own blogs but have them as part of the same company domain. You can use it to give people distinct platforms to work on away from the main blog on your site that can be for official news.
It also comes with the added benefit of being centrally controlled by a Super Admin user and allows you to share themes and plugins across a number of blogs.
Alternatively, you can convert your website into something like WordPress.com for your users, allowing them complete individuality while also keeping a tight hold of the system security and management.
The joy of using multi-site is that each site you create can be completely distinct without having to go through the trouble of installing WordPress multiple times or adding multiple databases. That, in a nutshell, is the key selling point.
Setting up multi-site can be challenging but is straightforward if you know what you’re doing (which is why you’re reading this!). It requires the addition of various pieces of code in your wp-config.php file and your web server’s .htaccess file.
The WordPress Codex has a complete guide on creating a network version of WordPress.
Since you are converting an existing website, you have to use the subdomain option for multi-site. This is due to existing permalink issues. The WordPress team are investigating ways around this, but for the moment that means your multi-site blogs will be using a URL structure of blog1.mydomain .com and blog2.mydomain.com.
Now before you go any further, take a complete backup of your WordPress installation. You want a copy of the database and files just in case anything goes horribly wrong so you can rollback without any problems.
Now that you have a backup, it’s time to get started.
The first thing you need to do is download a copy of your wp-config.php and .htaccess file to your computer using an FTP program such as FileZilla.
Once you have them both saved locally, open then with your favorite text editor. The .htaccess file may be hidden so you will need to set your viewing options to include hidden files. Information on how to do this can be found from your Operating System help or by a quick Google search.
Now we need to edit the local wp-config.php file. Add the following code snippet above the first line that begins with require or include:
/* Multisite */ define( 'WP_ALLOW_MULTISITE', true );
Once you have made the change, upload the wp-config.php back onto your web server, overwriting the previous version. When the file has been uploaded, log into the Admin Dashboard of your website. Before you can go any further you will need to deactivate all of the plugins you have installed. They can be reactivated once the multi-site conversion is complete.
After you have disabled the plugins browse to Tools > Network Setup.
In this section you choose your Network Name and the Network Admin email address. Click Install when you have made those decisions.
You are then given code specific to your site to insert into the wp-config.php and .htaccess files. Follow the instructions and add this code to the local versions of the files and then upload them to your web server, overwriting the existing files.
One thing that may be worth noting is that the code required for the wp-config.php must be placed before the first line that begins with require or include just as it was with the previous code addition.
Once you have completed these steps, you will need to log back into the Admin Dashboard. It may be necessary to clear your browser cache for this to work correctly. This is now the Network Dashboard and once you’ve logged back in there should be a new item in the menu bar along the top of the screen. Where the name of your site was before should now display as My Sites.
Here you can reactivate all your plugins as network-activated plugins and installed themes as network-enabled themes. That means they will be available for use with every site you create in this multi-site installation. This is also where you will add new plugins and themes in future so that you can then use them on every site if you choose to.
Creating A New Site
Now that you have configured the multi-site installation of WordPress you can now add new sites to the network. This is done in the Network Dashboard by clicking on Sites > Add New.
You then simply give the site a name and title and add the admin user email address. If this address isn’t already associated with a user, a new user is created.
As this is a conversion to multi-site and is using the subdomain options, you will need to add the subdomain entry into your site DNS that matches your new site name. If you can add this a few days ahead of time things will be much easier for you. If you haven’t already added this to your DNS, you should do that now before waiting for around 48 hours before continuing.
Once the DNS has updated, you can log into the new site dashboard and begin creating your content and managing the site plugins and themes as you would for any new WordPress Installation. You don’t have to use all of the plugins or even the same theme as the primary site.
You can repeat the above steps to add as many new sites as you want.
Converting an existing website into a multi-site installation comes with a few additional problems over a clean installation but it is a great way to add additional channels of content to your domain.
The limitation of having to use sub-domains for your sites is the only real issue when converting an existing website. If you would rather have your websites as folders at the end of your domain, you may be better creating a brand new WordPress multi-site installation and importing your existing website into it.
This process requires a whole post of its own which we may deal with at a later date.
Do you use WordPress multi-site? Did you choose to convert an existing website or did you simply start over with a clean installation? We’d love to hear about your experiences with multi-site and any management tips for running a WordPress network in the comments below.