Under rare circumstances, it is possible that the connection between the staging and the production site gets lost.
Under WP Staging > Sites you will see that your staging site is not listed any longer which looks like this:
This can happen when you try to migrate manually your staging site to live or by deleting the database row which contains the WP Staging settings.
This can also happen if you moved your production and staging site to another server. Read here to find out how to reconnect both sites in that case.
If WP Staging loosed its connection to the staging site it’s not possible to push the staging site to the production website any longer.
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.
As long as you change only the mentioned data rows you cannot break anything but It’s still a good idea to make a backup first!
WP Staging stores all its staging sites as serialized data in the table
wp_options and in the row with the option_name
So, create a new staging site. Give it any name but not the same as the staging site you want to connect to.
You can exclude all files and database tables to speed up the cloning process.
This will create a data set like this in the table
Get this data and copy it
As you can see here this data set is for a staging site with the following parameters:
- Directory location
As this is a serialized data set 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.
- Next step is to open the PHP serialized data online editor from the link below and paste the data into the input form 1 (Paste in serialized PHP here)
- Now, change the path to the staging site in the input form 2 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 is the path to the root directory 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 back 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 by going to WP Staging > Sites