Why You Should Use a Staging Environment in Your Projects

Published in WordPress.

It doesn’t matter how good a developer you are: making modifications to a live site is very risky. Miss-type a single char and your website can break and show the WSOD.

To avoid problems, the safest thing is to make all the changes in a safe environment. An environment where, if anything goes wrong, nobody will care. Because nobody will see it or have access to this site, except you and your fellow developers.

Today we will see the advantages of using staging environments and how to create and use one with SiteGround. I’ll be using this hosting provider because, well, it’s our hosting provider 😉

What is a Staging Environment?

As I have already told you, a staging environment is a safe space where you can do whatever you want safely, as mistakes will have no impact on your live site. In essence a staging site is nothing more than a regular website (in our case, another WordPress) isolated from external access.

The interesting thing about the staging environment is that it doesn’t have to start as a blank site. Usually, staging sites are created as doppelgangers of already-existing sites (i.e. your current, live site), becoming their exact copy. And let me emphasize this: when I say “exact copy” I really mean it. Both sites will have the same content, the same WordPress version, both will use the same set of plugins and themes… they’ll even share the same infrastructure (server, database, PHP versions)!

Thanks to creating a safe environment that’s identical to our live site, we guarantee that any changes we make in staging will also work in live. And if anything goes wrong, we know it would have also gone wrong in live (and we would have avoided a disaster).

How to Create a Staging Site in SiteGround Step by Step

The possibility of creating a staging environment is something that depends on the hosting provider you have. In our case, SiteGround is our hosting provider and they make staging really easy. To create a staging site of your WordPress you must perform the following steps.

First, access SiteGround’s administration panel. Recently they renewed the user interface, making it much more intuitive and faster. If you don’t see it, don’t worry—they’re rolling it out slowly.

SiteGround Account Home Page
SiteGround Account Home Page.

Once inside, click on the Websites tab to view your website. In the following screenshot you can see the test website I created for this tutorial: davida30.sg-host.com.

List of Websites in SiteGround
List of Websites in SiteGround.

If it’s a WordPress site, you’ll see that you have a button with the WordPress Kit, which offers a few shortcuts to the most-used WordPress utilities (including the creation of a staging copy of your site). Alternatively, you can click on Site Tools to access all the tools on your website:

Site Tools
Site Tools. This is similar to the “old” cPanel.

As you can see, you have a lot of tools available to manage your website. This is similar to the famous (and slightly outdated) cPanel, but with a much more elegant and intuitive design. Click on WordPress to see the options available for a WordPress site:

WordPress tools
SiteGrounds offers several WordPress-specific tools to manage your site.

There you’ll see the one we want: Staging

Staging copy management in SiteGround
Staging copy management in SiteGround.

which gives you access to your already-existing staging sites, as well as a simple form to create new ones. To create one, just name it and click on the Create button:

Creating a new staging site in SiteGround is quite easy
Creating a new staging site in SiteGround is quite easy.

Personally, I like to name my staging sites using a descriptive name that reminds me why I created the site in the first place. For example, assuming I’m interested in testing a new theme, I could name the staging site as “Testing a new theme.”

Once you have created the test environment, you will see it’s listed at the bottom of the page, in the Manage Staging Copies section:

List of Staging Sites
List of Staging Sites.

From here you have links to access the staging WordPress (which exists in a special subdomain, similar to https://stagingX.myweb.com). Open the staging site and you’ll see it’s an identical copy of your live site. Easy and simple!

For each staging copy there are some extra actions. Click on the ellipsis icon to reveal them:

Staging Site Actions
Staging site actions include a Full Deploy, which will overwrite your live site.

On of these options is Full Deploy, which will overwrite your live site with the content and setup of this staging copy:

Staging overwriting confirmation
Before overwriting a live site, SiteGround will ask for confirmation.

Just make sure you first confirm you want to overwrite it 😉

Summary

Today we have seen the importance of using testing environments to make changes to a website safely and without affecting our live site. In addition, we have learned to create a staging copy of our site using SiteGround and how we can apply all the changes into our live site using the Full Deploy option.

If you have any questions, let us know in the comments section bellow and we’ll be happy to help.

Featured image by Ostap Senyuk on Unsplash.

PoorNot badGoodGreatExcellent (No Ratings Yet)
Loading...

Leave a Reply

Your email address will not be published. Required fields are marked: •

I have read and agree to the Nelio Software Privacy Policy

Your personal data will be located on SiteGround and will be treated by Nelio Software with the sole purpose of publishing this comment here. The legitimation is carried out through your express consent. Contact us to access, rectify, limit, or delete your data.