I have been building WordPress websites for years and have gotten pretty damn good on it (cue the sound of my trumpet blowing). Having said that, every development, sandbox and production site I have built has been a stand-alone site using it’s own core WordPress install. In some cases, this is required so updates to development don’t impact production, but for most of my sites, this just leads to extra work and out of date development sites!
I recently moved my own site to a multisite network and as I have a couple hours to kill in a cafe in the middle of nowhere, I figured I would share how I did it.
What is a WordPress Multisite Network?
WordPress says it perfectly:
A multisite network is a collection of sites that all share the same WordPress installation. They can also share plugins and themes. The individual sites in the network are virtual sites in the sense that they do not have their own directories on your server, although they do have separate directories for media uploads within the shared installation, and they do have separate tables in the database.
Basically – One install of WordPress, themes and plugins shared by all your sites. This means that when you update, you only have to update once and it will update all your sites.
Is this for me?
Maybe. If you have a standard website environment (production, development, maybe test or sandpit) then you will probably benefit from a multisite network. If you have multiple sites hosted with the one webhost, then you may also benefit. However, if you have multiple sites across multiple hosts, or you only have one WordPress site, you might be better to stick with individual install.
Subdomain vs Subdirectory
A multisite can be accessed one of two ways, either as a subdomain (e.g. domain.wordpress.com) or subdirectory (wordpress.com/domain). If you are converting an existing WordPress site to a multisite, then you will not be able to use the subdirectory approach as it may clash with existing URL’s on the site.
Setting up Wildcard Subdomains
When using a subdomain, you will need to do some updates with your domain host. If you are allowing users to create sites (such as WordPress.com), then you will need to create a wildcard subdomain. This will vary from domain name provider, but broadly will just be creating a sub domain titled *.
Note – this may not be supported by your host. If this is the case, then you will need to manually setup a subdaomin for each site.
Enable WordPress Multisite
The first step before enabling multisite is to disable all plugins. Once done, open
wp-config.php and insert the below code above where it says
/* That's all, stop editing! Happy blogging. */.
/* Multisite */ define( 'WP_ALLOW_MULTISITE', true );
Save you file and refresh WordPress.
Installing the Network
Now go to the
Administration -> Tools menu and you will see
Network Setup. This is where you will get the option to choose subdomains or subdirectories, along with a few other options. Enter the details, click go and wait.
Once finished, you will be presented with some updates to
wp-config.php. Follow the instructions, save the files and log back into WordPress. Re-activate your plugins.
Creating a new site
Once set up, Creating a new site is easy. Go to the Network Dashboard and click sites -> add new site. Give the site a subdomain and click go. Once you are completed, go to the new sites dashboard to confirm that is has worked.
Note: You may need to create a subdomain for your new site if you host doesn’t allow for wildcard subdomains.
Some Required Tweaks
After you have created the multisite network, there will be a couple tweaks to make to get your website back to it’s former glory.
Permalinks kinda work after transition to a network… but best to check. I found the following issues:
- Addition of the
blogtag to the permalink structure – There is a good article here as to why it does this. However , if you have an established website, the alteration of your permalink structure isn’t something that can happen without being managed. For my needs, I just removed it.
- Permalink structure slightly different – I was including the
%category%tag in my permalink structure which just disappeared once the site was converted to multisite. Once I added it back, my site worked once again.
Network Activate and Must Use Plugins
To network activate means to make a plugin available for all sites. Some performance and security plugins only operate correctly once network activated. I found that once I network activated these plugins, I had to the reconfigure as the settings reverted to default.
Must Use plugins are always on for all sites and can not be disabled by users. These are loaded into their own directory
Useful Multisite Plugins
There are heaps of useful plugins for WordPress, however there are two that I found invaluable for migrating and running a multisite network.
- BackupBuddy – Although it is experimental, BackupBuddy is great at moving a single site into a multisite environment. I found that it worked best when the source and target domain name matched, which sometimes meant restoring in a temporarily created sub domain.
- Multisite Clone Duplicator – This tool is amazing at copying an existing site within a network and duplicating. Perfect if you want to make development or sandpit environments of a production site.
Subdomains Multisite DOES work on GoDaddy
Lastly, I wanted to touch on subdomains within GoDaddy hosting. I Googled for hours on how to get Subdomains working on GoDaddy. Every post I read said that it wasn’t possible (and at the time, it could have been the case)… but i persevered… and got it to work! Well, mostly. I couldn’t work out the wildcard domain approach as that didn’t want to work, but I knew the subdomains I wanted so this wasn’t a concern.
To enable subdomain multisite in WordPress, go to GoDaddy Hosting Manager and create the subdomain that you want. Set the path to be the same as the main domain name. Once done, simply create your new multisite website!
And that’s all you need to know to create a WordPress Multisite environment. This cafe is closing up around me now and I’m starting to get some funny looks so time to go. If you have any questions or comments, leave them below!
A special shout out to the following sites that helped me with my first WordPress Multisite Install:
- WPMUDEV – https://premium.wpmudev.org/blog/ultimate-guide-multisite/
- Half Elf on Tech – http://halfelf.org/2010/switching-to-wordpress-multisite-breaks-links/
- WordPress – http://codex.wordpress.org/Create_A_Network