WPCloud Deploy Documentation

Considerations and gotcha’s when cloning sites, changing servers and/or changing domains

When cloning a site or changing a domain name you MIGHT encounter a number of issues. Whether you encounter these issues or not is dependent on the site you’re copying, the sequence of steps you take and so on.  Regardless, if you do run into these issues, here are instructions for resolving them.

Cloning A Site To A New Server – Object Caching

If you push a site to a new server then you need to make sure that you either:

  1. Turn on the SAME object caching mechanism as the original server (Redis or Memcached) or
  2. Turn OFF the object caching mechanism:
    1. To turn OFF the object caching mechanism, you need to delete the symlink for the object-cache.php file in the wp-content folder if it exists.  If an object-cache.php file exists there instead then you should delete it as well.

Backups

When a site is cloned to a new server, the backups are NOT transferred with it!

Permissions After Cloning or Domain Name Changes

After cloning a site or changing a domain, plugins might start to complain about permission errors.  This just means that you have to reset the permissions on the WordPress folders because the NGINX user for your site has changed (to match the new domain name).  If you need instructions then please contact our support team.

Redirect Issues After Cloning or Domain Name Changes

After cloning a site or changing a domain you might find that navigating to the new domain somehow takes you back to the original domain.  Here are some possible causes:

  1. The DNS for the new domain is not pointing to the new server (if you moved servers)
  2. The object cache is not cleared.  If you are running an object cache, the best thing to do is to flush the cache and then restart the object cache service.
  3. Double check your wp-config.php to make sure that there are no references to the old site in there. (See a possible related issue in Multisite in the next session)
  4. It is possible that the main sites table still have the old domain referenced. Using phpMyAdmin, check the wp_blogs and wp_options table.  The old domain will likely be in one of the first few rows of those two tables.  (Note that the wp_ table prefix might be different for your site.  It could something random such as hquXT_.)
  5. Definitely try clearing cookies for both the new site and old site in your browser.  It is possible that a cached redirect still exists there and that the browser is just not picking up the new domain without a redirect.

Potential Multisite Issues

When pushing a multisite to a new server or cloning a multisite or changing a domain on a multisite, you’ll need to make some adjustments after files and data have been copied:

  1. Update wp-config.php to make sure that DOMAIN_CURRENT_SITE is set to match your new domain (if you changed domains).
  2. If you do not see the DOMAIN_CURRENT_SITE entry in wp-config it means that the site is no longer considered a multisite.  To easily resolve this, go to the MULTISITE tab in the WPCloudDeploy control panel and toggle the Multisite option to ON – it will update the wp-config.php file.  Then, double-check the DOMAIN_CURRENT_SITE entry in wp-config.php.
  3. If you have changed the domain on a MultiSite then the subsite domains in the MULTISITE tab in the WPCloudDeploy control panel need to be updated.  You should delete the existing subsites that are there and re-add them.  (Deleting them from there does not delete them from your database, it just deletes them from our stored metavalues so you can re-add the new references).

We’re hoping to check for and automate away some of these issues in a future version of WPCD but, for now, you should be aware of them and contact our support team with any questions or issues you might have.

Share: