How do I create a WordPress staging site?
Create a private staging copy of your WordPress site in cPanel with Softaculous, test changes safely, then push the updates back to live.
A staging site is a private copy of your live WordPress site. You can update plugins, try a new theme or edit templates there without visitors seeing anything change, then push the work back to the live site once you are happy with it. This guide covers making that copy from cPanel using Softaculous, testing on it, and pushing it live. Start by logging in to cPanel.
Create the staging copy
- In cPanel, find the Software section and open Softaculous Apps Installer.
- Open the WordPress installations list (in most setups this is WordPress Manager, or the WordPress icon followed by the list of current installations).
- Locate the install that runs your live site and choose the staging option for it.
- Pick where the copy should live. A subdomain such as staging.yourdomain.com or a subfolder such as /staging both work. If you want to use a subdomain, create it in cPanel first; there is a separate guide for that in the knowledgebase at /kb.
- Leave the database name and other advanced fields at their defaults unless you have a reason to change them.
- Start the copy and wait for it to finish. A large site with many images can take several minutes.
If your WordPress site was installed manually rather than through Softaculous, the staging option will not appear until the install has been imported into Softaculous. The import option sits in the same screen.
Test your changes on the copy
Open the staging URL and log in at /wp-admin. Your usernames and passwords are copied across, so the same credentials work.
Two things are worth doing before you start:
- Under Settings then Reading, tick the option to discourage search engines from indexing the site, so the copy does not compete with your live pages.
- Deactivate caching and security plugins on the copy. They often store the live domain in their settings and can send you back to the live site or serve stale pages.
The staging copy has its own files and its own database, so nothing you do there affects the live site.
Push the staging site back to live
- Take a full backup of the live site before you push anything. Restoring from a backup is far simpler than undoing a bad push.
- Return to the WordPress installations list in Softaculous and choose the push to live option on the staging install.
- Review what will be copied. You can usually choose files only, database only, or both, and exclude particular folders or tables.
- Confirm and let it run.
Pushing the database replaces your live database. Any posts, comments, form entries or orders added to the live site after you made the copy will be overwritten. For a site that collects data daily, push files only, or make a fresh staging copy right before the push.
If it didn't work
Staging is not available on every setup, so if the option is missing entirely, check whether Softaculous is included on your plan and whether the install has been imported into it.
A copy that fails partway through is usually a disk space problem, since staging duplicates both the files and the database. Check Disk Usage in cPanel and clear out old backups first.
A staging site that redirects to the live domain or shows broken styling is nearly always a caching, CDN or security plugin holding the old URL. Clear the cache and deactivate those plugins on the copy.
Still stuck? Open a ticket at /support with the staging URL and we will take a look.
Stuck partway through? Support is answered by the engineers who run the servers, around the clock.