How to Clone Your Website

It seems that we get this question on a weekly basis: “I want to copy my website to a new domain or different folder, but I’m not sure of the best way to do this. How is it done?”

If you’re looking to move your website from another provider to Websavers, we call these migrations. You can learn how to migrate your website here.

It used to be that the only way to do this was to simply download all the files to your computer via FTP, then remove them from the server and upload them to the new location, whether that be a different folder or path. With the common use of databases now, this doesn’t entirely take care of things; in many cases entries in the database reference the old domain or old folder path, making it a long and messy process to complete.

You read about the manual site migration process here, if you wish. Unfortunately, it’s lengthy, cumbersome and sometimes technical. Definitely not a simple approach. But don’t worry! It turns out there is an easier way. Just be sure that you’re using one of the apps in our web application installer (e.g.: WordPress, Joomla, ImpressPages, and dozens more!)

Cloning with 1-click web apps

There’s now two ways to accomlish this, although result in the exact same result.

In the Client Centre

  1. Login to the Client Centre and Manage your hosting plan
  2. Under the Web Applications box, find the app you wish to clone and click the Manage button followed by the Clone button
  3. Select the destination. It could be a domain, subdomain and/or path you wish to copy the site to. You can also choose the option to create a new domain here.
  4. Click Clone or Continue to proceed with the clone.

Within Plesk

  1. If you’re copying the site to a new domain or subdomain, you must add your new domain in Plesk at this time
  2. Go to the 1-click web apps utility and find the web app in the list that runs your site
  3. Press the Clone button and select the new domain, subdomains and/or path
  4. Click Clone or Continue to proceed with the clone.

That’s it! It will automatically update all configuration files and paths in the database for you as well as copy over all files.

If you have uploaded or created files outside of the web application, be sure to copy those over manually after the clone is complete.

Once the clone has been completed here’s two additional steps you may wish to take:

  • If you are only planning on using the website at the new URL, you should now remove the old site using 1-click web apps. This ensures it is not a security risk for your hosting account.
  • If your clone was completed to move the site to a new domain, take a look over our guide to setting up a 301 redirect to ensure anyone reaching the old domain is redirected to the new one.

Troubleshooting

After cloning, some files are missing, like custom fonts. Why is this?

If you go to the 1 Click Web Apps tool, click on the site, and then go to the “Files and Tables” tab, you’ll see a list of all the files and folders that 1-Click believes are part of the web application.

If your fonts are in a directory on the web root (e.g.: /fonts instead of /wp-content/fonts) there’s a very good chance that it just doesn’t know that these files are part of the application.

Should you find it not selected you can click the checkbox next to it and then click save at the bottom. Then, when you clone next, it will know that it is part of the content you wish to copy. You should do this for any files or folders you choose to put up that are outside of the “expected” WordPress structure.

To fix it this time around, copy the files over manually, then be sure to follow these steps to add them to 1-click’s file structure. Alternatively you can opt to always add your custom files in your child theme’s folder; that is where they belong after all!

After or during cloning my site I get a 500 error

See this knowledge base article to learn how to fix 500 errors.

After cloning my site, styles and theme settings are not loading properly!

This is, unfortunately, a common one. It might make you think that the clone is not actually a perfect copy, well you’d be somewhat right! But it’s not actually the clone process to blame (per se).

Many themes store their data using a method called serialization. Basically, when serialization is used, every string of text is saved to the WordPress database with both the text and an associated # of characters. This is supported by WordPress and our clone tool! However some themes do not abide by serialization’s standard practices and so the data becomes corrupt during the migration. After all, if your theme doesn’t follow the standard, our tools can’t know how its customized version of serialization works!

Well built themes either use serialization according to spec or they provide one of two solutions to this problem:

  1. When you manually re-save your theme settings (note, not WordPress settings — the settings fields that pertain only to the theme), it will fixing everything with a simple click of the save button.
  2. Others aren’t so elegant, and instead they’ll require you to export your data from the old domain/installation to some random format of their choice (xml? csv?) then import that file into the new installation. This requires more work (boo), but it does solve the problem.

If you’ve run into this problem and your theme does not support one of the above two solutions (or even if they only support the 2nd one), we suggest either reporting the issue to your theme developer, or consider switching themes.

Jordan is a computer, security, and network systems expert and a lover of all things web and tech. Jordan consults with project management for software companies. Jordan is a founder and managing partner at Websavers Inc.