WPCloudDeploy Documentation

Cloning (Copying) Sites

WPCloudDeploy makes it easy to copy a site to a new domain on the same server.  This process is called “Cloning”.

To clone a site:

  • Go to WPCloudDeploy → Applications
  • Click on the site for which this action will apply
  • Click on the Clone Site tab
  • There should only be a single section on this screen.  Enter your domain name for the new site.
  • Click the Clone Site button
  • Click the OK button in the confirmation window

A popup will appear that will offer periodic feedback as the cloning process progresses.

When the process is complete you will get a popup confirmation message and the black ‘terminal” window will show the actions that were taken while cloning the site.  In particular the “terminal” window will provide an idea of all the search and replaces that were done in order to update the site with the new domain name.  You can also see this information in the COMMAND LOG screen.

Before Cloning A Site

Please make sure that there is enough disk space on the server to clone the site.  You can use the options under the Statistics tab to see how much disk space is being used by the site.  If the cloning fails because of a lack of disk-space, your new site will be left in an undefined state and you will need to use our PAID support resources to help you clean up the site on your server.

Cloning Large Sites

When cloning large sites, you might see some “file not found” errors in the terminal.  This is because it is taking a very long time to copy the files and, while that is happening, there is no output being sent to the log files.

If you know that your site is large then you should be patient and let the clone run a bit pass all those error messages.

Other error messages you receive might be from plugins – these are generated after the clone is complete and we are attempting to run some post-clone commands.  Many plugins just don’t like being loaded on the command line and so throw up a bunch of errors.  For the purposes of the clone operation, you can ignore these.  In rare cases, really badly behaved plugins and themes will error out and cause the post-clone commands to fail.  If this happens, you might need to take a backup instead and do a manual restore in order to get a clone of the site.

After Cloning A Site

  • We strongly suggest that you clear the OBJECT CACHE (such as MemCached or REDIS) if it’s enabled.

Multisite Considerations

When cloning a MULTISITE installation of WordPress you might have to do some clean up work in order to get the new network to function properly:

  1. Change the DOMAIN_CURRENT_SITE entry in wp-config.php to point to the new domain.
  2. Add all the subsites into the MULTISITE tab in the WPCD Dashboard for the new domain.
  3. Re-request SSL certificates for all the subsites in the new domain.

You might also need to request an SSL certificate for the main site as well.

Notes

  • It is possible that the WP-CLI commands that run to change the domain (after the site has been copied) may fail.  This usually occurs because one or more plugins or themes throw an error when WP-CLI is running – you’ll see the errors in the logs.  The easiest way to work around this is to disable the plugins you have before cloning and then re-enable them after the cloning process has been completed.
  • When cloning an OLS site, the PHP version will always be the WPCD default (currently 8.1).  When cloning an NGINX site, the PHP version will be the same as the original site.
  • A cloned site starts with a new default VHOST configuration file.  This means that items such as 7G/6G, tweaks, web-server redirects and HTTP AUTH are NOT copied to the new site.
  • Cloned sites do not inherit backup configurations
  • Cloned sites do not inherit the LINUX CRON setting – the sites default back to the core WordPress CRON process.

 

Share: