Conversation
supportI’ve used this plugin successfully in the past, but have tried again and am seeing something quite odd (same hosting, same site as successful prior runs). When I cloned the site, the resulting site in the Sites dashboard looks like: ://clonedsite.example.com Note the lack of a protocol. The siteurl and home url entries in Settings are also both blank . Editing the siteurl / home in the Site Admin > Site settings tab “fixes” this, but what is still broken is that all posts and attachments throughout the resulting site have URLs such as https:///wp-content/uploads/2024/some-image.png or https:///blog-post-name-is-here (note the THREE slashes, so obviously the site domain is being replace as an empty string) So basically, the site data is all cloned with an empty siteurl, which of course breaks many things. WP Engine hosting, if that is relevant. Has anyone else experienced this issue? It’s .. worrying. This topic was modified 1 year, 2 months ago by grex22 .
This issue with WP Site Cloner appears to be related to how the siteurl and home values are being set (or not set) during the cloning process. The three-slash ( https:/// ) issue strongly suggests that the domain replacement step is failing, leaving an empty string where the domain should be. Possible Causes: Database Serialization Issues If the plugin replaces site URLs in serialized data but doesn’t handle it correctly, it could lead to missing or blank values. WP Engine’s Caching or Redirect Rules WP Engine has aggressive caching, which can sometimes interfere with site cloning/migration scripts. Try purging all caches in WP Engine’s dashboard and checking for any forced siteurl overrides in wp-config.php . Missing wp_options Updates Normally, wp_options should be updated with the new siteurl and home values during cloning. If this fails, URLs can break. Inconsistent Environment Settings If previous clones worked fine but this one didn’t, something may have changed in WP Engine’s setup, or your WordPress configuration may have been altered. Troubleshooting Steps: Manually Update wp_options Run this SQL query in PHPMyAdmin or through WP CLI: UPDATE wp_options SET option_value = 'https://clonedsite.example.com' WHERE option_name IN ('siteurl', 'home'); If this fixes the issue, it suggests the plugin isn’t properly updating these values. Check wp-config.php See if WP_HOME or WP_SITEURL is being forced: define('WP_HOME', 'https://clonedsite.example.com'); define('WP_SITEURL', 'https://clonedsite.example.com'); If missing, adding them manually might help as a temporary fix. Run a Search & Replace on the Database Use WP-CLI or a plugin like WP Migrate DB to replace empty URLs with the correct domain: wp search-replace 'https:///' 'https://clonedsite.example.com/' Test with a Different Site Try cloning another site on WP Engine. If the issue persists across different sites, it might indicate a WP Engine-specific change affecting the cloning process. Check WP Engine’s Support Logs WP Engine may have logs that show why the siteurl value is missing. Since this worked before on the same hosting, it’s possible WP Engine made a change that affects the cloning process. If none of the above fixes work, you may want to check with WP Engine support to see if they’ve adjusted how they handle site migrations/clones.
This issue with WP Site Cloner appears to be related to how the siteurl and home values are being set (or not set) during the cloning process. The three-slash ( https:/// ) issue strongly suggests that the domain replacement step is failing, leaving an empty string where the domain should be. Possible Causes: Database Serialization Issues If the plugin replaces site URLs in serialized data but doesn’t handle it correctly, it could lead to missing or blank values. WP Engine’s Caching or Redirect Rules WP Engine has aggressive caching, which can sometimes interfere with site cloning/migration scripts. Try purging all caches in WP Engine’s dashboard and checking for any forced siteurl overrides in wp-config.php . Missing wp_options Updates Normally, wp_options should be updated with the new siteurl and home values during cloning. If this fails, URLs can break. Inconsistent Environment Settings If previous clones worked fine but this one didn’t, something may have changed in WP Engine’s setup, or your WordPress configuration may have been altered. Troubleshooting Steps: Manually Update wp_options Run this SQL query in PHPMyAdmin or through WP CLI: UPDATE wp_options SET option_value = 'https://clonedsite.example.com' WHERE option_name IN ('siteurl', 'home'); If this fixes the issue, it suggests the plugin isn’t properly updating these values. Check wp-config.php See if WP_HOME or WP_SITEURL is being forced: define('WP_HOME', 'https://clonedsite.example.com'); define('WP_SITEURL', 'https://clonedsite.example.com'); If missing, adding them manually might help as a temporary fix. Run a Search & Replace on the Database Use WP-CLI or a plugin like WP Migrate DB to replace empty URLs with the correct domain: wp search-replace 'https:///' 'https://clonedsite.example.com/' Test with a Different Site Try cloning another site on WP Engine. If the issue persists across different sites, it might indicate a WP Engine-specific change affecting the cloning process. Check WP Engine’s Support Logs WP Engine may have logs that show why the siteurl value is missing. Since this worked before on the same hosting, it’s possible WP Engine made a change that affects the cloning process. If none of the above fixes work, you may want to check with WP Engine support to see if they’ve adjusted how they handle site migrations/clones.