Hey y’all! We are back with another #WordPressWednesday! And this week we are going to go a little deeper and create Multisites.
Cool! So what are Multisites?
Multisites are different instances of WordPress sites running on one install. It makes it easy for you to maintain different sites on one domain running WordPress. Many businesses use Multisites as a way to create temp sites for promotional purposes. It makes it easy because once the promo its over, they can take the site down with one click. Or if they want a different layout depending on topic or region it can be set that way as well. But you can do it too! Say you have a main site but wanted a blog site with a different theme/layout. This can be done using Multisites! It can also be used if you wanted to have a network of users making their own sites (kinda like Wix) or maintaining client sites on your domain.
So how does it work?
Multisites piggybacks off of your domain and give you the option of either using subdomains (blog.slwdigitalagency.com) or subdirectories (slwdigitalagency.com/blog) to install a new instance of WordPress on. Because of this, it’s best to configure the Multisite feature on a new WordPress install. You can still do it on an existing site, however you may run into issues, or worse, it just won’t work. I originally tried to do this with my domain and ran into problems, but was able to get it to work successfully when I did it on my development site. So I’ll show you step-by-step how to get it setup. This will be a bit challenging and tedious, but we’ll both get through it together!
Configure your Multisite
So first we’re going to start with our WordPress Site. I’m using my dev environment for this (and I’ll show you how to set up one in a future post!). But for now, you just need a site with a fresh WordPress install and make sure all your plugins are inactive. Next, you are going to go to your FTP folder (or wherever your web files are stored) and find the folder where your WordPress files are installed.
There are two files you are going to be changing – wp.config and htaccess. For now, we are going to be editing the wp-config file.
***(Disclaimer: Before making any changes to your WordPress file(s), please make a backup copy first!)
Download your wp-config file (make sure you make a copy of it) and open it up in your favorite text editor. Scroll down to the bottom until you see the text: /* That’s all, stop editing! Happy blogging. */.
Above that line, enter the following code:
Save your changes and upload the newly edited file to your WordPress folder. Now go back to your WordPress site, and in the admin screen navigate to Tools > Network Setup.
From this screen where you will configure your Multisite. You can either select Subdomains or Subdirectories (Note: if you try to setup Multisites on an existing WordPress setup the subdirectory option will not available for you to select. This option is only available on a new install). Select which option you want, enter your email address and hit Install. For this tutorial, I’m going to do the subdirectory option.
The next screen is going to generate some code. It’ll look something like this:
You are going to copy the code and enter it where it tells you to in the wp-config and htaccess files.
wp-config: You will paste this code before the text /* That’s all, stop editing! Happy blogging. */. Be sure you remove the “define( ‘WP_ALLOW_MULTISITE’, true );” line from your config file or else the setup screen will keep coming up. Save the file and upload it to your WordPress folder.
htaccess: You will paste this code and overwrite everything between #BEGIN WORDPRESS and #END WORDPRESS lines. Save the file and upload it to your WordPress folder.
Once the files are successfully saved and uploaded, log out of your WordPress site and log back in. Your admin bar should look something like this:
If it does success! You just made your own Multisite! If it does not, or if you are seeing weird errors, double check your wp-config and htaccess files and make sure you copied the code over properly.
Setup New Multisites
Now that your Multisite is configured, you can go ahead and setup a new site. To do this navigate My Sites > Network Admin > Sites and from there you can create a new site.
Enter in the name of the new site you want it to be, along with the title and email address. Once finished, click add site.
And that’s it, your new site is created! If you type in the new web address the new WordPress will come right up. You can now start customizing your new sites to your heart’s desire.
Whew that was a lot! But I hope you found this tutorial helpful and easy to follow. And if you have any suggestions, feel free to leave them below. See you next week!