How to Set Up a Staging Site on Cheap Shared Hosting
A plugin update at nine in the evening is how most small sites go down. The dashboard shows four updates waiting, you click update all, and thirty seconds later the homepage is a blank white page with no error on it.

A plugin update at nine in the evening is how most small sites go down. The dashboard shows four updates waiting, you click update all, and thirty seconds later the homepage is a blank white page with no error on it. Now you are reading forum threads in a panic, on a site that was working perfectly ten minutes ago, with no idea which of the four updates caused it.
A staging site is the fix for that specific problem. It is a private copy of your live site where you can break things on purpose, and the reason people on cheap hosting skip it is that every guide seems to assume you are paying for a managed plan with a staging button. You are not necessarily, and you do not have to. There are three ways to do this, two of them free, and the hardest part is not the setup but the three gotchas nobody warns you about.
What a staging site is for, and what it does not replace
Staging answers one question: does this change break anything? You copy the site, apply the change on the copy, click around, and if it holds up you repeat the change on the live site. That is the whole idea.
What it does not do is protect you. A staging site is not a backup, because it is usually a copy of a copy that nobody keeps current, and nothing restores from it automatically. People conflate the two constantly, and the consequence is a site owner who feels covered and has no restorable copy of their database from this month. The two jobs are separate and you want both. The restore side is in the guide on backing up a website and testing the restore, and it is the more important of the two if you only have time for one.
It is also not a development environment. If you are writing code rather than clicking updates, you want the site running on your own machine, where you can use a debugger and a proper editor. Staging is for the middle case: changes you are applying through an admin interface, on a site you did not build yourself.
Three ways to do it, by what your host gives you
Start by finding out which of these you already have, because two of the three cost nothing.
A staging button in your control panel. Most managed WordPress plans and a growing number of mid tier shared plans include one click staging. It creates the copy, rewrites the URLs and gives you a push to live option. If you have it, use it and skip the rest of this section. The trade is price, which is covered in the piece on what managed WordPress hosting includes and whether it is worth paying for.
A subdomain on the same account. This is the method that works on nearly any shared plan, including the cheapest ones, as long as you can add a subdomain and create a second database. It costs nothing extra and takes about forty minutes the first time. The downside is that it shares the same server and the same PHP version as your live site, so it is a poor test for server level changes.
A copy on your own computer. Free tools can run a full local server in a few clicks, and a local copy is faster to work on and impossible to leak to the public. The catch is that it is further from reality: different PHP build, no real SSL, no mail sending, and anything that depends on the live domain behaves differently.
For most people on a cheap plan the subdomain route is the right answer, and the local copy is worth having as well if you ever edit theme files.
Setting up the subdomain copy, step by step
This assumes a typical shared control panel and a database driven site. Reckon on forty minutes for the first one and about fifteen after that.
- Create the subdomain. Something unguessable is better than staging, so use a word nobody will type by accident. Point it at its own folder rather than inside your live site's folder, which keeps the two sets of files from ever mixing.
- Take a full backup of the live site first. Files and database. You are about to copy a database, and the one time in ten that something goes sideways, you want the original safe before you started.
- Copy the files. Use the control panel file manager to compress the live folder, download nothing, and extract the archive into the new subdomain folder. Doing it server side avoids a slow upload and preserves file permissions.
- Create a second database and user. A separate database is not optional. Two sites sharing one database is the single fastest way to turn a test into an outage.
- Import the database dump and update the config. Export the live database, import it into the new one, then edit the site's configuration file so it points at the new database name, user and password.
- Rewrite the URLs in the database. Your old domain is stored in dozens of rows, and until you change them the staging copy will quietly load images and links from the live site. A search and replace plugin or a single SQL update across the options and post content tables handles it.
- Block it from search engines and from visitors. Turn on the discourage search engines setting, add a disallow all robots file, and put HTTP basic authentication on the subdomain in your control panel. All three, not one of them.
- Disable outgoing email. A mail suppression plugin, or clearing the mail settings, so that testing a contact form or an order does not fire a real message at a real customer.
Once it is running, note the date you created it somewhere visible, because that date is the only thing that tells you how much you can trust the test.
Why I think most small sites should not keep one running
This is where I part company with the usual advice. A permanent staging site on a small website is usually a liability, and I have watched it cause the problem it was supposed to prevent.
The reason is drift. The copy is accurate the day you make it. Three months later the live site has forty new posts, two plugin updates and a changed theme setting, and the staging copy has none of them. You test an update against that stale copy, it passes, you apply it to live, and it breaks, because the thing it conflicted with was added in August. Now you have false confidence, which is worse than no test at all, because you applied the change without reading the changelog or taking a fresh backup.
The practical version is disposable staging. Make the copy on the day you need it, from the current live site, run the test, then delete the subdomain and the database. Fifteen minutes of setup against a copy that is three hours old tells you something real. A permanent copy mostly tells you what was true last quarter.
There is also a security argument. A forgotten staging subdomain runs old plugin versions nobody patches, often with weaker passwords, on the same account as your live site. That is a well known route in, and scanners look for exactly these subdomain names.
The three things that go wrong
Duplicate content indexing is the most common. A staging copy that gets crawled puts a second version of every page into the index, and the cleanup is tedious. The noindex setting alone is not enough, since it only works if the crawler obeys it and if nobody links to the subdomain. Password protection at the server is what actually stops it.
Real emails leaving the staging site is the one that embarrasses people. Order confirmations, password resets and newsletter sends all work perfectly well from a copy, which is the problem.
The third is mixed URLs, where half the site loads assets from the live domain. It looks fine, which is the trap: your test is partly running against production files, so a change to an image or a stylesheet appears to work when it has not been applied at all. Check the browser network panel for requests going to your live domain before you trust any visual test.
What to do this week
If you have never tested a change before applying it, do the smallest version of this now. Add a subdomain, put basic authentication on it, copy the site across and leave it for a day while you click around. You will learn more about how your own site is wired together in that hour than in a month of reading.
Then use it for the next thing that actually scares you. A major plugin version jump, a theme change or a server side move like a PHP upgrade, which is the one case where a subdomain on the same server genuinely does not help you and the steps in updating your PHP version matter more.
FAQ
Can I set up a staging site on cheap shared hosting?
Yes, if the plan lets you add a subdomain and create a second database, which almost all of them do. The work is manual rather than one click, and it takes about forty minutes the first time you do it.
Will a staging site hurt my search rankings?
Only if it gets crawled. Put HTTP basic authentication on the subdomain and the question does not arise. Relying on a noindex tag alone is the mistake that creates duplicate pages in the index.
Do I still need backups if I have staging?
Yes, and they matter more. Staging tells you whether a change works. A tested backup is the only thing that gets your site back after a change that went wrong anyway, or after a hack.
Should I delete a staging site after testing?
I would. An abandoned copy running unpatched plugins on your account is a real risk, and a stale copy gives misleading test results. Recreating it from the live site takes fifteen minutes once you have done it once.
More in Hosting and Domains
Hosting and Domains
Inode and Entry Process Limits on Shared Hosting
A reader wrote to me last March after his host suspended his site at nine on a Friday evening.
Hosting and Domains
What Is Managed WordPress Hosting and Is It Worth Paying For
Your WordPress site is slow, an update broke something last month, and a hosting company is offering to "take care of...
Hosting and Domains
What Happens When a Domain Expires and How to Avoid It
An email lands saying your domain expires in seven days, or worse, your site and inbox simply stop working one morning.