How to Use WP Ghost on a Staging Site

Yes, you can run WP Ghost on a staging site. The staging site counts as one site on your plan, the same as the live site. To give it the same setup, copy your settings with Backup Settings and Restore Settings, or let your host’s clone tool copy them with the database.

Does a staging site use one of my plan’s sites?

Yes. Your live site and your staging site each use one site of your plan. A plan limits how many sites run WP Ghost Premium at the same time, so when you delete the staging site, remove it from your account and the slot is free again. See Can I recycle sites on a limited plan?

Connect the staging site the same way as any new website: activate WP Ghost on a new website.

Copy your settings from the live site

  1. On the live site, go to WP Ghost > Backup/Restore and click Backup Settings. The download starts on its own. The file is named after your domain, for example example_com_settings_backup.txt.
  2. On the staging site, go to WP Ghost > Backup/Restore, click Restore Settings, upload the file and click Restore Backup.
  3. WP Ghost saves the settings and writes its rules again for the staging site.

The restore keeps the staging site’s own licence token and its white label settings. Everything else comes from the file, including your custom paths. Backup/Restore is in the free version too.

If your host clones the whole site

A clone copies the database, and WP Ghost keeps its settings there. So the staging site starts with the same custom login path as the live site, and with the same Safe URL. Log in to staging with the custom login path you use on live.

If the staging site runs on a different server, open WP Ghost > Change Paths and click Save, so WP Ghost writes its rules for that server. On Nginx, the server has to load WP Ghost’s config file and be reloaded: see set up WP Ghost on Nginx.

If you get locked out of the staging site

  • Use the Safe URL. You find it in WP Ghost > Advanced > Rollback Settings, next to Custom Safe URL Param. It turns off the custom paths so you can log in at the default login page.
  • Or add define( 'HMWP_DISABLE', true ); to the staging site’s wp-config.php. WP Ghost stops loading until you remove the line.

Frequently asked questions

Do I need a separate plan for staging?

No. Staging uses one site of the plan you already have. If your plan is full, remove a site you no longer use, or move to a plan with more sites.

Will restoring the backup replace my staging site’s licence?

No. Restore Settings skips the licence token and the white label settings, so the staging site stays connected with its own token.

My staging copy is in a /staging/ folder and its home page shows a block page. Why?

The firewall on your live site treats a bare /staging/ address as a probe, because attackers often look for forgotten copies there. It only matches the folder’s own address, not the pages inside it. Put the staging copy on a subdomain such as staging.example.com, or on the live site go to WP Ghost > Firewall > Whitelist and add /staging/ to Whitelist Paths.

Related Articles