• Resolved e dev

    (@efishinsea)


    After creating a staging site, I tried to rename the path from ‘site-staging’ to ‘site-dev’ in wp_options for the ‘wpstg_staging_sites’ value. I changed this in 4 places, but when I do this, the staging site vanishes from your plugin’s list of “staging sites”

    a:1:{i:1726879511105;a:29:{s:9:"cloneName";s:11:"site-staging";s:13:"directoryName";s:11:"site-staging";s:4:"path";s:31:"/var/www/wordpress/site-staging/";s:3:"url";s:40:"https://website.com/site-staging";s:6:"number";i:1;s:7:"version";s:5:"3.8.5";s:6:"status";s:8:"finished";s:6:"prefix";s:7:"wpstg0_";s:8:"datetime";i:1726879639;s:12:"databaseUser";s:0:"";s:16:"databasePassword";s:0:"";s:16:"databaseDatabase";s:0:"";s:14:"databaseServer";
    ... etc ...
    ;}}

    The staging site still works fine in the location it was created in but no longer shows up in your plugin settings, and if I change these values back, they work ok.

    How would I go about changing the data reference to the physical path I wanted without recreating everything?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Fayyaz

    (@fayyazfayzi)

    Hi @efishinsea ,

    Renaming the staging site path directly in the database is not recommended, as WP Staging stores multiple references across different options. The best way to rename your staging site is to:

    1. Create a Backup – Back up your existing staging site. How to create a backup
    2. Create a New Staging Site – Clone your live site again with the desired name. How to create a staging site
    3. Restore the Backup – Apply the backup to the new staging site. How to restore a backup
    4. Verify & Test – Ensure everything works before deleting the old staging site.

    Alternatively, if you prefer modifying the existing staging site, you can manually update the wpstg_staging_sites option in wp_options, ensuring all references to the staging site’s path, directory name, and URL are updated correctly.

    Our dev team will also look into this request, and we’ll evaluate whether introducing a built-in feature for renaming staging sites is worth implementing.

    Let me know if you need further assistance!

    Cheers!
    Fayyaz

    Plugin Contributor Fayyaz

    (@fayyazfayzi)

    Hi @efishinsea ,

    I wanted to follow up and clarify that the issue occurs because the staging site data is serialized in the database. Editing it manually without considering serialization can break the reference, causing the site to disappear from the WP Staging plugin’s list.

    To correctly update the staging site reference, you need to edit the serialized data properly using a specialized editor. Please follow this guide for detailed steps: Reconnect Manually by Editing the Database.

    Let me know if you need further assistance!

    Cheers!
    Fayyaz

    Thread Starter e dev

    (@efishinsea)

    Ah, that makes sense as to why editing the non-serialized strings didn’t work. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.