What Is A Staging Site And Why You Must Have One

If you’re actively working on your WordPress web site and you don’t use a staging site, you’re just asking for all kinds of trouble.

Updating or trying out new plugins, working on design, changing your theme or changing how your web site works on a live site, can result in a very unexpected outcome. Translation: NEVER test anything on a live site until you’ve first had a trial run on a staging site.

What Is A Staging Site?

Let’s start with the idea that the site your visitors see is your live site. (Most web hosts and developers refer to this site as your production site.)

Want More Of This?

Be eligible for service discounts and keep up-to-date with WordPress news, resources and advice delivered to you just about every Sunday.
  • Don’t you worry about a thing. Your email address is kept safe with those crazy monkeys at MailChimp.

Why Subscribe?

If you’re actively working on your WordPress web site and you don’t use a staging site, you’re just asking for all kinds of trouble.

Updating or trying out new plugins, working on design, changing your theme or changing how your web site works on a live site, can result in a very unexpected outcome. Translation: NEVER test anything on a live site until you’ve first had a trial run on a staging site.

What Is A Staging Site?

Let’s start with the idea that the site your visitors see is your live site. (Most web hosts and developers refer to this site as your production site.)

You don’t want to do anything which may cause it to go down. Depending on the type of site you have, this could mean loss of revenue, membership, or even, over time, a loss in your position with Google – or it could be just downright embarrassing.

You certainly don’t want to pay someone to fix whatever you did that caused your site to go down.

In contrast to your live site is a staging site. This is an exact copy of your live site. It is where you can test out new plugins or see what a design change will look like before anyone else sees it. It’s where you can mess up and won’t suffer the consequences.

How easy or difficult it is to set up a staging site will depend on your web host. Hosts like WP Engine, Site Ground, and Kinsta – to name just a few – make it really easy to set up. Other hosts – GoDaddy comes to mind – have recently gotten into letting customers set up staging sites, but it’s not as easy as WP Engine (my favorite hosting company and recognized as the gold standard by many).

Where Is Your Staging Site Located?

Where your staging site resides will depend on how your host sets up a staging site. For example, this site (https://joyofwp.com) has its staging site at https://joyofwpstage.wpengine.com/.

The key is that the staging site is an exact duplicate of your live site when the staging site was created. This means that the server environment, SSL, and all other factors are the same.

But there is one difference.

A true staging site will not have server caching. This means when you try out new designs and plugins, you won’t have to deal with an older version of what you’re testing that has been stored via caching in your computer.

Note that while most staging environments have server cache turned off, some do have server caching. Make sure you know what you’re working with.

What If I Can’t Make A Staging Site?

What I’ve done for clients whose web hosting plans don’t allow for a staging site is to set up a clone site.

This is not a one or two click process. This involves manually copying all files, exporting them, setting up and importing a database, and hooking up a bunch of things to build the clone site.

This kind of site may or may not have SSL and it very likely will have server caching – which is not preferred. But at least you will have a copy of your live site. You don’t have to say, “I wonder what will happen if I do…” to your live site, only to see it fall apart following your trial of a plugin or a design change.

Should My Staging Site Be Password Protected?

You must keep away prying eyes from your staging site.

If your staging site is not password protected that means anyone can see it and it can be confused for your live site. Even worse, Google will find it and index it into their system. You don’t want that.

If you don’t want to set up password protection (and something that I like even better), then use a plugin like WP Maintenance Mode so that users and Google will see a “Coming Soon” message.

What Login Credentials Do I Use For My Staging Site?

Whether you have a true staging site or you’ve got a clone site, the WP Admin login credentials you will use are the same as those for your live site. Remember, it’s a duplicate of your live site.

When I Make Changes On My Staging Site How Do I Push Them To My Live Site?

Pushing staging site changes to a live site is a bit tricky but I have one rule.

Don’t move the staging site to the live site…ever!

Doing that would overwrite the database of your live site.

Keep in mind that the two sites – live and staging – are totally separate. While you are working with the staging site, people are visiting your live site. Maybe they’re adding a comment, placing an order or joining as a member. Perhaps you’ve added a new page or changed some copy on a post after you created your staging site. All of these change what is stored in your database.

If you move your staging site to your live site, you will overwrite your live site database – so don’t do that!

Then how do I implement the changes I have made on the staging to the live site?

The method of implementing depends on the changes you have made.

If it’s a new plugin, then just install the plugin to the live site. If you have made some styling changes then make a copy of the CSS file and place it in the theme’s folder of the live site. If you have made changes in the functionality of the site using PHP, do the same with the functions.php file.

The exception might be if your site is brand spanking new and it was developed in the staging environment. In this case, there is no live site to replace. Then you can move the staging site to the live environment.

Bottom Line

You need a staging site (or some kind of duplicate site) to try out changes you wish to make to your live site. It’s that simple.

3 thoughts on “What Is A Staging Site And Why You Must Have One”

  1. Bud — I have to disagree with your warning of never moving a staging site to a live site. Maybe you just meant not to copy the staging site to the live site directly? There a number of plugins that will migrate the staging site to production. Some that come to mind are Duplicator Pro and UpdraftPlus, which require a paid version for the features one would want. WPVivid backup also does migrations in their free (for now) version. I also think that SiteGround and most likely WP Engine tools that create the staging site will also help migrate as well.

    Reply
    • I get you point which is good. I’m just concerned about over writing a live DB that has changed since the staging DB was created and subsequently changed. If there were a way to migrate just what was changed in the DB I’d be better with that but my understanding is that it doesn’t. For example, say all you did was add a new post to staging and you wanted to move that to live. That certainly changes wp_posts table (and others too). How would you move just that change to live?

      Reply

Leave a Comment

3 thoughts on “What Is A Staging Site And Why You Must Have One”

  1. Bud — I have to disagree with your warning of never moving a staging site to a live site. Maybe you just meant not to copy the staging site to the live site directly? There a number of plugins that will migrate the staging site to production. Some that come to mind are Duplicator Pro and UpdraftPlus, which require a paid version for the features one would want. WPVivid backup also does migrations in their free (for now) version. I also think that SiteGround and most likely WP Engine tools that create the staging site will also help migrate as well.

    Reply
    • I get you point which is good. I’m just concerned about over writing a live DB that has changed since the staging DB was created and subsequently changed. If there were a way to migrate just what was changed in the DB I’d be better with that but my understanding is that it doesn’t. For example, say all you did was add a new post to staging and you wanted to move that to live. That certainly changes wp_posts table (and others too). How would you move just that change to live?

      Reply

Leave a Comment