Since version 3.0, you have natively had the option to activate WordPress Multisite, which allows you to run as many sites as you want from a single WordPress installation (whereas previously it was one website per WordPress installation).
If you run a lot of sites, or you have lots of clients that you keep websites for, it can be a lot of maintenance to go to each one individually and update them on a regular basis.
With WordPress Multisite, you can update all the plugins and themes with just one click, which is a huge time-saver. I currently run a network of about 10 sites and it makes it so much easier to keep everything updated. You could have a much larger network of sites and it would be no more difficult to update them all.
The benefits of WordPress Multisite are massive and I thoroughly recommend it to anyone who wants to run more than one site, unless there’s good reason for keeping the sites separate from one another.
If you find this tutorial a little too daunting, you can always hire me to do it for you. If you’re comfortable fiddling with code, here’s how to do it…
Back up everything!
You’re about to be making some significant changes to your core files and in particular, your database, so be sure to take a thorough backup of both even if you automate your database backups.
Allow multisite installation
To avoid dangerous mistakes, you have to intentionally enable the option to even install multisite. Fortunately, it doesn’t require much of you. Hunt down your wp-config.php file which should be in the root of your WordPress installation, find the “stop editing” line and insert the following line just above it, like so:
Setup the network
Now when you refresh your WordPress admin, you’ll see an additional option under the Tools menu called Network Setup. Head there. You’ll be presented with a few options, like what to call your network and the email address of your Super Admin (see A Quick Guide to User Roles). You may also be presented with the option to choose between sub-directory or subdomain installation. Unless you desperately want a subdirectory installation, I would strongly suggest subdomain installation. Fill the options out and hit the big old install button (but only if you promise me that backed up your site first).
Enable the network
Now that your database is ready to get the network going, you need to edit a couple more files to make the network active. Fortunately, the clever WordPress monkeys made it very explicit and easy for you to understand.
After setting up the network, you should be presented with a page that shows you a few blocks of code. Enabling the network involves adding some code to two files: wp-config.php and .htaccess, both of which should be in your website’s root folder. The code for your wp-config.php will look something like the code below:
Add a wildcard subdomain
At this point, you should also enable a “wildcard subdomain” in your hosting account, which will allow WordPress to use whatever subdomain it needs to create all the different sites. I’m going to show you how to do this in cPanel, since this should be available to most of you (especially if you use the awesome HostGator).
Once logged in to cPanel, hit the Subdomains icon. You’ll then have a small form that will enable you to add a new subdomain (above any subdomains that might already exist). Create a new subdomain of * on the domain of your WordPress master site, setting the document root as public_html, or wherever the root of your website is, if it’s not there.
Once you’ve successfully done that and added all the code that WordPress asks you to, you’ll need to login again. There should be a link at the bottom of the Network setup page. Click there and log back in, where your new multisite-enabled site will be waiting for you.
Tweaking your settings
How you set up your network will largely depend on how you want to run it. For example, on my network, I don’t want to allow anyone to be able to create their own site, though that is an option if you want to do that. I also don’t want to limit what kind of files can be uploaded (since I’m in charge of all the sites), or what size they can be, though if you have a more open network, you may want to put some of those restrictions in place.
To modify your network settings, you’ll need to go to the newly created Network Admin area; your original WordPress site will continue to have it’s own admin area, but there will be a new overarching Network Admin Area where you can install themes, plugins and add new sites and users from. To access it, you can go to the admin bar and find it under the My Sites menu. You can also go to yourdomain.com/wp-admin/network to get to the Network Admin area.
Once you’re at the dashboard, you can find the network setup page under Settings > Network Settings. Just have a good look through at everything and set up the options as you see fit for what your network needs are. You can of course change them if they are too strict or lax in the future.
If you’re going to disable new site registrations, so that only a Super Admin can create new sites, you might want to add another declaration to your wp-config.php file, just below all the ones you pasted earlier. This will redirect people to a specified site if they try to access a site that doesn’t exist (presumably your master site). For example, since I have the following declaration in my wp-config.php file, anyone trying to access balloons.theukedge.com, which does not exist, will be redirected to The UK Edge:
Adding a new network site
Now that your network is all set up, you’ll probably want to add your first network site. Doing so is a fairly simple process. Go to the Add New option under the Sites menu in your Network Admin area.
The process of adding the site is incredibly simple. Just three pieces of information are required of you; the site address, which is where your site will be accessed from. For example, if I was going to create a site at parties.theukedge.com, I would simple insert parties in this field.
You’re then asked for the Site Title and finally the Administrator’s email. If you want to add yourself as the site’s admin, just enter the same email address that you used in your existing profile. Alternatively, you can set it as someone completely new.
Once you click on Add Site, it will create the site for you and you are then given the option to go to the Dashboard, or Edit the Site. Simple huh!?
How about using custom domains for my new sites?
As you’ll have noticed, everything up to this point has allowed you to create new sites as subdomains to the Network Master Site, where you installed Multisite. But what if you want to use custom domains for your new sites? For example, I have WordPress Multisite installed on theukedge.com, but Do It With WordPress is a network site from that installation, even though it’s domain (doitwithwp.com) is not a subdomain of theukedge.com.
Well, I’ve written a tutorial that walks you through that process. If you’ve gotten this far, it’s only a small step to be able to use individual domains for your network sites. Go ahead and read How to Set Up Domain Mapping for WordPress Multisite.
Problems? Questions? Requests?
So, how did it go for you? Did you get it set up successfully? Do you have any questions that I didn’t cover in this tutorial? Or was there something that you need me to help you with? Let me know in the comments.