Why You Need To Be Using A Staging Site
This post will take 7 minutes to read.
I was speaking with someone the other day who runs a WordPress website that averages around $1,000 a day in sales. She mentioned to me that she went to update a plugin a few weeks ago and there was an issue with the plugin’s update. Even worse, the issue caused a fatal error which resulted in the white screen which crashes your website preventing anyone, even you, from using it. Her site was down and she had no idea how to fix it. She tried to reach out to the plugin developer but did not receive a response. So, she had to quickly locate and hire a WordPress developer to fix her site so she can get it back up. The developer charged her $250 for fixing the site. By the time she tried to fix the site, contacted the plugin’s developer, found a different developer, and the developer fixed the site, her site was down for almost the entire day. So, this single plugin update cost her almost $1,000 in sales and the $250 for the developer to fix it. What if your website crashed? Do you know how to fix it or do you have a plan to account for this? Scenarios like this is why everyone should have a staging site.
What Is A Staging Site
A staging site is an exact copy of your site that is available away from your live site. The staging site could be in a sub-folder, a subdomain, or hosted elsewhere. Staging sites allow you to make changes, updates, or theme switches on a copy of your website that your customers and users do not see. So, when you have a plugin update, you can update the plugin on your staging site first. If everything goes well, then you can update your live site knowing that it will work correctly. Or, maybe you want to test replacing a plugin with a different one. You can test this on the staging site to make sure that the new plugin works with your theme and other plugins before installing it on your live site. You should never make changes to your live site unless you know for sure that everything will work.You should never make changes to your live site unless you know for sure that everything will work. Click To Tweet
Why risk crashing your site and losing sales or visitors? So, how do you set up a staging site? Some hosts have a one-click staging site feature. If your host doesn’t provide one, there are two main ways to do it and I have outlined them below.
Setting Up A Staging Site In A Subdomain
In this approach, you are creating a copy of your site in another folder on your server. This process can be quite complicated. There are 3 main steps for this process. You need to create a subdomain, make a copy of your WordPress database, and then make a copy of your WordPress files. If you are going this route, it may be much easier to create a new WordPress install in your subdomain and then use a migration plugin. So, let’s take a look at how to do that.
Many hosts use cPanel to allow you to make changes to your hosting package. If you do have access to the cPanel, log in and go to the Domains section. In the Domains section, there will be an option labeled Subdomains. Click on it to go to the Subdomains page. From here, enter the desired prefix in the Subdomain text box. Usually, you would want something easy to remember like “dev” or “staging” but this can be anything. Then select the desired main domain from the menu. Usually, you would choose the domain for your WordPress site. If you only have one domain in the cPanel, then you do not need to adjust this. Now, click “Create”. It is important to note that creating a subdomain could take several days until other computers on the web to recognize the new subdomain.
Most hosts that have cPanel also has a way for you to install WordPress which is probably the way that you installed your live WordPress site. So, using that same feature, install WordPress in your new subdomain. This process differs between each host but usually would you click to install WordPress and it will ask which domain that you want to install it in. There then should be a drop down with your domains and your new subdomain.
Once you get WordPress installed in your subdomain it’s time to install the backup plugin on both the live site and staging site. My recommended backup plugin that includes a migration feature is Backup Buddy. This is a premium plugin but it is well worth the money and it includes storage of your backups for your live site so you can keep your site backed up in case anything ever does happen. If you want to go the free route, you can install the All-in-One WP Migration plugin. To use that plugin, you can follow these simple steps. Backup Buddy makes it even easier with simple steps using their migration feature so I won’t list those steps here but it is very similar to this process.
Once you have the plugin installed on the Live site, go to your new Site Migration menu. Leave your current website listed in the first field. In the second field, enter in your staging site URL. For example, if your staging site is “http://staging.example.com” then that would be what you will put into that field. Now click “Export Package” and download your export file. Next, go install the plugin on your staging site. From here, go to the Import page and upload your export file. Once the file is finished being processed, you will then have a full copy of your live site on a staging site! Of course, this process is complicated and time-consuming if you have to re-do this process if your staging site needs to be re-copied from your live site. Also, what happens if your server goes down? There is actually a great solution for staging sites.
Setting Up Staging Sites With WP Stagecoach
The last way was a bit complicated. What if I told you that there was a way that you can create a staging site with the click of a single button and could even import your changes from the staging site back to your live site? You can with WP Stagecoach. I recently discovered this great service and am amazed at how easy this makes staging sites. This is a premium service but it starts at only $4 a month. Thinking about my friend who lost almost $1,500, I am sure she would have gladly paid $4 a month to prevent that. To set up your staging site, simply take 1 minute to sign up for their service. Then, install and activate the plugin they give you.
All you have to do now is click the “Ride the Stagecoach!” button. After a few moments, you will have an entire staging site set up at the staging site URL for you to start testing on. This process is much simpler and quicker than the previous method. I had the pleasure of meeting the developer of WP Stagecoach, Jonathan, at WordCamp Raleigh. He has spent a lot of time creating a system that is easy to use and allows anyone to utilize staging sites. This is a great service and one I recommend to anyone that doesn’t already have a staging site so be sure to sign up today!