Before I update a busy site, I always test the change on a staging site first. You should do the same.
A staging site is a private copy of your live website where you can try updates, new plugins or design changes. If something breaks, only the copy breaks, and your visitors never notice.
Why use a staging site?
A live site is like a shop with customers inside. You would not repaint the walls during business hours. A staging site gives you a back room to work in. Yes, it takes a few extra minutes, but fixing a broken live site takes much longer.
Here are a few changes worth testing there first:
- Major WordPress, theme or plugin updates
- A new theme or page builder
- Custom code in functions.php
- A PHP version upgrade
Our guide on why, how and when to update WordPress covers the safe way to handle updates.
How to create a staging site in WordPress
There are two common ways. Plenty of hosts offer one-click staging in their control panel. If yours does not, a staging plugin can copy your site into a subfolder or a subdomain, such as staging.example.com.
- First, create the staging copy from your host or plugin.
- Next, log in to the staging site and make your changes.
- Now, test every important page, form and checkout.
- Finally, push the changes to the live site, or repeat the same steps there by hand.
You can read more in our article on the WordPress staging tool.
Keep staging away from search engines
Your staging copy should stay hidden. On the copy, go to Settings → Reading and tick Discourage search engines from indexing this site. Some staging tools do this for you, but always double-check. You can also protect the copy with a password so only your team can open it.
Pushing a staging database to the live site can overwrite new orders, comments or sign-ups made in the meantime. On busy stores, push only the files or tables you changed.
That's it. A staging site is a small step that saves you from big headaches. Got a question? Drop it in the comment box below.