If you moved your website to another server and the paths to the production and staging site have been changed, WP Staging lost its connection to the staging site and you are not able to push the staging site to the production website any longer.
Instead of that, you’ll get a fatal error telling you that WP Staging cannot find the staging site or the folder
Fatal error! Path /public_html/staging/wp-content does not exist.
The staging site "staging" seems to be broken.
Create another staging site and try again.
If you are familiar with PHPMyAdmin and if you are not scared by doing a slight modification in the production database you can resolve this easily by changing the path to the staging site in WP Staging settings.
As long as you change only the mentioned data you cannot break anything. It’s still a good idea to have a backup, though!
WP Staging stores its settings as serialized data so you can not do a simple search & replace and you need to follow the instructions below carefully:
- Open PHPMyAdmin and look for the
wpstg_existing_clones_betain the database table
- Get the value of that column and copy it into an empty text file for backup purposes.
- The next step is to open the PHP serialized data online editor from the link below and paste the data into the input-form number one with the title “Paste in serialized PHP here”. http://sciactive.com/phpserialeditor.php
- Change the path to the staging site in the input form number two to the new location of your staging site!
You can get the destination by looking into the system info at
WP Staging > tools > system info and finding the value ABSPATH.
- This value contains the absolute path to the root folder of your WordPress website.
Just add the subfolder name of the staging site and you’ll get the full path to your staging site.
- Go back to PHPMyAdmin and paste the modified serialized PHP data into the field
wpstg_existing_clones_beta, overwrite the old value and save it.
Now WP Staging is connected again to your staging site and you can migrate your staging site to live without getting the error message any longer.
If you need help with this please get in contact with us.