How to Migrate a Big Website to a New Domain or Subdomain for Free for Testing (the Easiest Way)

migrate big websites for free - title

I’d like to show you how to copy or migrate bigger WordPress sites (more than 500 MB and very likely more than several GB). This method is easy and free. It’s great for creating testing copies of your big websites. This method in its core includes using All-in-One WP Migration plugin (a free version) and manually copying media files (‘uploads‘ folder).

Also in this article I compare my other articles on similar topics. And so, you can choose the tutorial that suits you better.


 

Why I’ve created this tutorial and what you’ll learn

Creating copies of your big website for testing or migrating your big website can be a real issue. Especially if you want to do it for free. The problem is in size of your website that most plugins (even paid ones) can not handle.

I’d like to show you the way how you can copy (clone, or migrate) even a big website to a new domain or subdomain for free and as easy as possible.

Yes, Even BIG sites. For free. And easily. And even if you use a budget shared hosting. (By the way, you’re welcome to check out my recommended shared hosts.)

Also, this method has no SEO risks. In other words, you can avoid any risks of getting duplicate content (in case you will want to keep both original and cloned websites).

Sometimes easy tricks can save huge amount of your time and money.

And moreover, combination of some easy tricks can have even a bigger effect.

This tutorial contains such tricks.

Although this method can work as a website migration technique in many cases, the main purpose of this tutorial is to demonstrate creating a testing copy of a big website. The website copy becomes available on a separate domain or subdomain.

Why don’t I feature this article as a tutorial how to migrate (or clone) large WordPress websites to a new domain for free? Well, you can use this tutorial for this purpose. In many cases it will work fine.

But in some cases specific plugins or applications may not be copied flawlessly out of the box this way. Custom files and folders also are not migrated. This is so because sometimes it’s impossible to migrate a whole site fully automatically. More on it see below in the Limitations chapter.

So, in short, summarizing the points why you may find this tutorial useful:

  • Clone and migration plugins don’t work well in most cases with big websites (from a couple of hundred megabytes and more) especially on a standard shared hosting. This quite a limitation.
  • Even if you site is less than 500 MB, your shared hosting may be too weak to handle this job anyway. But the method I demonstrate you in this article will help you get it done easily.
  • Copying a website manually to a new URL may be too daunting or just too complicated to non-technical users.

In short, what you will learn from this tutorial:

  • How to create a testing copy for free of your big website which can be more than 500 MB or even more than 2 GB in size. A free version of WP-Migration plugin is used for this (yes, even for sites more than 500 MB).
  • How to migrate such a big site for free to another domain or subdomain. (It may work in mane cases, but in some cases although you may need to do additional manual actions to complete the process.)
  • How to hide the content on the new domain or subdomain from search engines. (The most reliable ways: setting password on the whole WP installation on cPanel level; Access restriction by IP.)

This is the easiest free method of copying/cloning/migrating WordPress websites that I know so far.

By the way, I use the method described in this tutorial to create a copy of a website to test speed performance optimization. You can check you my articles on website performance optimization here.

A disclosure notice: There are some affiliate links on this page for the products which I mention in this post (incremental website backup service by CodeGuard; hosting by SiteGround). In other words, I get paid if you click on the links and make a purchase. All such links open in new window/tab; no software/program will be installed to your computer. (This is a standard notice required by affiliate programs terms.) Please note that I mention these products not as an advertisement, but as my recommendation.

 

Comparing with other my articles about cloning sites for testing and staging

I’ve already written an article on a similar topic (“How to create a staging area for testing plugins etc using WP Staging plugin”). However, its use is limited since the staging area can be accessed only from the administrator account.

On the contrary, the tutorial in this blog post explains how to create an independent copy of your site. It can be useful if you want to test caching plugins or something that should be tested only from outside (i.e. not from the administrator or a specific user account).

I’ve got also another similar tutorial that features WP Clone plugin. It also allows to create an independent copy of your site. But this plugin fails on 10-20% of websites (according to the plugin’s author). Also WP Clone is much more sensitive to bigger websites (more than 200-500 MB) and may not work with them on a shared hosting.

In other words, if you have a website more than 100-200 MB then this new tutorial featuring All-in-One WP Migration plugin is much more preferable and reliable way to clone your website. And this tutorial explain how to do it with a free version of the plugin even if your site is more than 500 MB in size.


My articles on similar topics overview:

 

Limitations of All-in-One WP Migration plugin

Here are the most important limitations that you need to consider when using a free version of All-in-One WP Migration plugin.

 

500 MB only with free version

A free version of the plugin allows to migrate (copy, clone) only websites which take up no more than 500 MB in the backup. If you export your website and find out that its backup’s size is more than that, then you can’t use a free version of the plugin to import the backup.

In this case, in order to be able to use a free version of the plugin, I recommend excluding media files from the backup when exporting it. The plugin allows doing this.

And then you can copy the media files (which are in the uploads folder) manually using FTP or simply cPanel File Manager.

In this tutorial I also demonstrate how media files can be manually copied to your new website (see this section).

Thanks to this ‘exclude’ option you can use a free version of the plugin to process even large websites (more than 2 GB). The upper size of the website you can process depends on how many media files (images) you’ve got on your website. The only size restriction for a free version of the plugin is that you need to have a backup less than 500 MB.

When you export a backup, the plugin you will let you know how much space the backup takes.

By the way, you can also exclude all themes, plugins, database, spam comments, post revisions and some other options. It allows to cut the size of the backup to speed up the copy (clone) process.

 

Custom files or folders are not processed

Like many other backup plugins All-in-One WP Migration plugin does not process custom files and folders. It means that the plugin can export and import your WordPress installation with all the plugins, themes, images. But it can’t export or import any files or folders that you add to your server even inside your WordPress installation folder.

For example, the following items will not be handled by the plugin:

  • HTML (or PHP) pages that do not belong to your WordPress installation;
  • Web applications that are not part of your WP installation;
  • Backup files that you store within your website;
  • Different files that you added manually inside your WP installation folder or somewhere on your hosting (e.g. the files which you’ve uploaded to verify your website with third-party services).

After you use All-in-One WP Migration plugin to clone (copy, migrate) your website, you need to copy these custom applications, files and folders additionally. Using an FTP client like FileZilla is a good idea for that.

 

Custom backup format

All-in-One WP Migration plugin uses its own backup file format. It means that you can’t use the backups without this plugin.

This custom backup file format allows the plugin work with large backups even on weak shared hosts.

It’s a superb feature because many other website backup and cloning plugins simply can’t work on medium and bigger websites because of the issues connected with limited resources even on great shared hosting.

 

The tutorial: how to copy (clone, migrate) a website to a new (sub)domain

There are the following steps in this process:

  1. Backup your original website. This has always useful to get a fresh copy of your website before making any changes like installing new plugins or manipulating your WordPress installation.
  2. Install a fresh WordPress on your (sub)domain where you want to have a copy of your original website.
  3. Install a All-in-One WP Migration plugin on your original website.
  4. Export a backup of your original website using this plugin. When creating the backup specify in the plugin’s setting that you want to replace your old domain name with the new (sub)domain name. Also, if your website is more than 500 MB in size, then exclude media files from the backup. You will add the media files to your new site later.
  5. Install a All-in-One WP Migration plugin on your (sub)domain.
  6. Import the backup on on your (sub)domain using the plugin. Then save permalinks structure twice.
  7. Discourage search engines from indexing your target website to avoid duplicate content.
  8. If you excluded media files from the backup, then add the media files (‘uploads’ folder) to your new site using file backup in cPanel File Manager or using FTP.
  9. If you want to keep both original and new websites, then make sure you disallow access to one of your sites to search engines to avoid duplicate content. The most reliable ways are to restrict access by IP and to set the password on the whole installation folder. You need this to avoid duplicating content.
  10. Optionally: Delete the backup file from your original WordPress installation on your hosting.

That’s it!


And here’s the video tutorial how to do it:

Below you can see the text-and-image version of this tutorial.

 

Step 1. Backup your website before making any changes

It’s a good piece of advice whenever you are going to do some changes on your website.
You may want to back up your whole hosting account creating a full cPanel backup (if you are on a shared hosting, such backup can be restored by your host). Also you can create partial cPanel backups of your files and databases separately (you will be able to restore them by yourself if you need it). I have tutorials about cPanel backups here.

By the way, I use a hassle-free, very reliable and super convenient backup solution CodeGuard (you may find my comparison review here).

So, I consider that you have your backups and you are safe. Now let’s move on.

 

Step 2. Preparing the (sub)domain: install WordPress

I assume you already have added a subdomain or registered a new domain.

Also you need to install WordPress on it.

 

Step 3. Install All-in-One WP Migration plugin on your original website

It’s dead simple. You just install and activate All-in-One WP Migration plugin the usual way. The plugin is ready to use.

Installing All-in-One WP Migration plugin

Installing All-in-One WP Migration plugin

All-in-One WP Migration plugin is different from many other WordPress backup plugins because it can overcome low server resources environment. In other words it can work perfectly even on really budget shared hosting.

 

Step 4. Export a backup of your original website using the plugin

You can create and export a backup easily using All-in-One WP Migration plugin. Just go to “Export” tab under the plugin title in your WordPress dashboard.

 

Handling even bigger websites

A free version of All-in-One WP Migration plugin can export a backup of a websites upto 500 MB. So, if your site is more than that, then when exporting a backup exclude media files.

The media files (images) usually take up the most space on your website. And excluding them from your backup will reduce its size dramatically. After that it’s very likely that a backup of your website will be smaller than 500 MB. It means that you’ll be able to use a free version of the backup.

To exclude media files from a backup, simply select the option “Do not export media library (files)”.

All-in-One WP Migration plugin settings

All-in-One WP Migration plugin settings

 

Replacing URL

When exporting a backup for migrating (copying, cloning) your website to a new domain or subdomain you need to specify two URL entries. The first URL is your current (sub)domain where your website is located at this moment. And the other URL is the new new (sub)domain where you want to migrate (copy, clone) your website.

It’s needed for correct replacing the internal URLs within a generated backup.

Replacing URLs in All-in-One WP Migration plugin (Export tab)

Replacing URLs in All-in-One WP Migration plugin (Export tab)

And finally click export backup (e.g. to file):

All-in-One WP Migration plugin: Export backup

All-in-One WP Migration plugin: Export backup

The exported backup will be saved (e.g. on your local drive).

 

Step 5. Install All-in-One WP Migration plugin on your target (sub)domain

This is as simple as it sounds. On Step 2 you already installed WordPress on your target domain or subdomain. Now just install the plugin on this target website like you did it on Step 3 on your original website.

 

Step 6. Import the backup to your target (sub)domain

You can do it very easily. All-in-one WP Migration plugin has a very neat user interface. So just go to the “Import” tab, specify import option (e.g. from file) and select the backup file to import.

All-in-One WP Migration plugin: Import backup

All-in-One WP Migration plugin: Import backup

After the backup import competes, you’ll see a message:

All-in-One WP Migration plugin: Import backup completed

All-in-One WP Migration plugin: Import backup completed

And then, as the plugin user interface suggests, go to your Permalinks Settings and save it twice (simply click save button twice). Saving twice is required because of inner particularities of WordPress after restoring a backup.

Note that after the backup was restored, you need to log in to your new WordPress website with the user name and password as in your original website.

Save Permalinks Settings twice after backup import

Save Permalinks Settings twice after backup import

 

Step 7. Discourage search engines from indexing your target site

This is super easy and quick to do. Just go to your target website’s WordPress dashboard / Settings / Reading. Select “Discourage search engines from indexing this site” and save “Save changes” button.

Discourage search engines from indexing your WordPress site

Discourage search engines from indexing your WordPress site

Although this setting does not guarantee 100% that search engines will disregard your site, this is recommended to do at this point. As you’ll see further in this tutorial (after you copy media files to your target site), you can restrict access to your target website with password or by IP to guarantee 100% protection from duplicate content issue.

 

Step 8. Add excluded media files to your target site

if on Step 4 you excluded media library when exporting a backup, then here’s how you can add the files to your target website on the new (sub)domain.

Basically, you need to copy the ‘uploads’ folder to your target site. This folder contains images and other files you uploaded to your original website.

After you imported a backup on your target website you already have uploads folder there. The folder may already contain some subfolders and files which belong to different plugins.

You just need to compare which subfolders are missing in the uploads folder on your target site and take (copy) them from your original site. It’s very easy. You can do it using an FTP client or simply cPanel File Manager (a default tool included on all hosts using cPanel).

Using cPanel File Manager on shared hosting for manipulating large files has a big caveat though. Shared hosts may limit the maximum size of the uploaded file within several dozens of megabytes. That’s why using FTP is usually the way you will need to copy the files.

Before copying uploads folder or its part, have a look at the two uploads folders (on the original website and on the target website) to compare them.

For this purpose you can use File Manager in cPanel:

File Manager in cPanel

File Manager in cPanel

In my example, the /wp-content/uploads/ folders in my original and target websites look like this:

'Uploads' folder on the source site

Uploads folder on the source site

'Uploads' folder on the target site

Uploads folder on the target site

Images for posts and pages are usually stored inside the year-based folders. In most cases, these folders is what you need to copy.

And media files for plugins and other media files are stored in other subfolders inside the uploads folder. You can also copy them, if you find out that on your target site some media or specifically uploaded files for your plugins are missing.

So, in my example I need to copy three folders: 2015, 2016 and 2017. It’s very easy to do using an FTP client (e.g. FileZilla) by copying the folders/files from the original site to my local drive and then from the local drive to the target site.

In order to use an FTP client you need to have FTP access to your hosting server. When you sign up with a hosting you get the FTP credentials (server address, port number, user name and password). Contact your host if you don’t know this information or can’t access your site files using FTP.

If you have never used FTP before, you may be a bit uncomfortable of starting using it as if this tool were something for technical people. This is not. This is a very convenient and easy-to-use tool. The only possible barrier for you is installing a new software (free) and spending a couple of minutes getting used to its user interface.

Advanced tip: If you want a more professional approach to handling/copying the missing or altered files in your uploads folder on your target site, you can use a folder and file comparison tools. You may want using it to determine what files are exactly missing in your target site’s uploads folder. Or find out the differences in specific files in the uploads folders on your original and target sites.

To do that you can download both uploads folders to your local drive. And then use a specific tool or a file manager with files/directories comparison functionality. (E.g. WinMerge (free) or Total Commander (shareware) for Windows). By the way, Total Commander supports FXP, so you can directly copy files from one server to the other without downloading the files to your local drive.)

 
Here’s a quick overview of the simple process how to copy files via FTP from your original site to your target site using FileZilla:

  1. Connect via FTP to your original site (/wp-content/uploads/ folder) and copy to your local drive the files/folders with media library (in my example the folders are 2015, 2016 and 2017).

    FileZilla user interface. Downloading folders with media files from the original server.

    FileZilla user interface. Downloading folders with media files from the original server.

  2. Connect via FTP to your target site and copy the files/folders with the media library from your local drive to your target site (/wp-content/uploads/ folder).

    FileZilla: Uploading the data to the target server.

    FileZilla: Uploading the data to the target server.

  3. 3. Remove the files from your local drive if you don’t need them. And that’s it!

Now you can open your your target website in your browser and you’ll see that all images and other medial files are in place.

 

Step 9. Disallow access to one of your sites to avoid duplicate content

In most cases you’ll want to hide content of your target site (in case it’s the testing site) from search engines.

On Step 7 you made the setting inside your WordPress site to discourage search engines from indexing the site. But I would not trust this setting 100%.

In order to hide your website copy completely from web crawlers and search engines and thus minimize the risks of getting a duplicate content, I suggest using two simple and free ways:

  1. Set password to the whole installation folder of your WordPress site using a cPanel tool.
  2. Restrict access to your site by IP.

You can use any of the two methods. See below how you can do it.

 

Setting password to the folder with your WordPress installation

When your website is password-protected, web bots including search engines crawlers will not be able to access and index your website.

There are some WordPress plugins that can let set the password super easily. However, I’m not a fan of using yet another plugin, because each plugin makes your site slower, more vulnerable to hackers and more sensitive to incompatibility issues. So, I’ll show you the plugin-free method to prompt anyone visiting your WordPress site to enter a password.

Some hosts (e.g. SiteGround) contain in cPanel the tool called “Password Protect Directories”. It lets you set the password for any directory with literally two clicks. Just select the application root directory (e.g. /public_html/ or a subdomain folder) and set the password for it.

But if your host does not have this feature for you, here’s how you can do a similar thing manually.

Go to your cPanel File Manager. And in the root directory select ‘public_html’ folder (of locate a subdomain folder), right-click on it and select “Password Protect” in the popup menu:

Selecting a folder in cPanel File Manager to protect it with a password

Selecting a folder in cPanel File Manager to protect it with a password

Then enter any name for the selected directory. Also enter any username and set the password. (A visitor will need to specify these username and password to view your website.)

Set password for a directory

Set password for a directory

By the way, to remove the password protection or this directory, simply deselect the checkbox “Password protect this directory”.

And then, when trying opening your website, anyone will have to enter the user name an the password:

Opening a website with password-protected directory

Opening a website with password-protected directory

 

Restricting access to your website by IP

I like this method very much. It does not make you remember user name and password. It’s especially convenient if you have a static IP address.

You need to edit your .htaccess file in your WordPress installation folder (by default it’s /public_html/)

You can do it using cPanel File Manager.
If you can’t find .htaccess file in your wordpress installation folder, make sure hidden files are visible:

Show hidden files in cPanel File Manager

Show hidden files in cPanel File Manager

Find out your IP address. You can do it here.

So, let’s assume your IP address is 50.36.43.12.
Then to forbid access to your site to anybody except you, add this code to the .htaccess file:

# Block access to anyone except the specified IPs
order deny,allow
deny from all
allow from 50.36.43.12 

If you have a dynamic IP address, you need to find out your IP range. Read this section of my website security tutorial to learn how you can do it.

Your website will open fine for visitors with the allowed IPs. And anyone else will get 403 error message (“website forbidden”).

That’s it with content duplication protection.

 

Step 10. If required, re-setup the plugins on your target site

When a site is migrated or copied to a new domain or subdomain, some of the plugins on the target site may become not functional. This can happen because the settings of the plugins can be stored in files which are not automatically copied properly by All-in-One WP Migration plugin.

For example, caching plugins and some security plugins may store their settings in .htaccess file. And the .htaccess file is not automatically copied to the target site. It means, that after you copied the site to a new (sub)domain, you may need to re-set some of your plugins if you want the to work on your target website.

 

Step 11. Delete backup file from your original WordPress (optionally)

On Step 4 you created a backup of your original website. You have downloaded it to your local drive. But the backup file also stayed on your server.

In order to clean up and save some space on your server, you can delete the backup (if you are not going to use this backup anymore).

You can do it easily. Simply go to your original website dashboard / All-in-One WP Migration / Backups. And delete the backup from the list:

Deleting backup from WP Migration plugin

Deleting backup from WP Migration plugin

Done!

 

Conclusion

This tutorial is the best free method I know so far to copy, clone or migrate a big (yes, big) WordPress site to another domain or subdomain. Your website can be actually any size. But its part without media files (e.g. images) should be no more than 500 MB (it’s the restriction of a free version of the plugin used).

This method works perfectly even on a budget shared hosting (by the way, I recommend these ones.

I especially recommend using this method to create an independent copy of your website which will be available on its own domain or subdomain. You can use this website copy to test anything (e.g. new plugins, new design etc).

The method basically consists of two parts:

  1. Using a free version of All-in-One WP Migration plugin (to copy your site without media library).
  2. Using FTP (to copy media files which are in the uploads folder).

There are also other free methods which let you clone a website or create a staging area. But each of the methods have some restrictions. However, in some cases you may find these methods more convenient. You can have a look at these methods overview above.

Subscribe to Free Researches
Get smarter and work on your blog and small business more efficiently

subscribe
BTW, I respect your privacy, and of course I don't send spam, affiliate offers or trade your emails. What I send is information that I consider useful.

Comments

  1. Hi Michael,
    Thanks for such a detail article about migration a big site to a new domain. This is one of the best articles I ever read about the migration of WordPress Website. Thanks again for such an effort.

  2. Hi Michael,

    I did the method you followed to migrate to a different host, the all in one plug in was not able to migrate the subdomain. is it normal ?

    • Hi Faisal,
      Thanks for the question.
      Yes, the plugin does not migrate subdomains together with the main domain.
      If your subdomains are different WordPress installations, then you need to migrate them separately.
      If your subdomains are just folders and files, then just move them (via ZIP file or FTP). You may need to replace your old URLs with new URLS additionally in the files (e.g. using any text editor or a special multi-file text replace tool for this purpose).
      Hope it helps.

      • Thanks Michael for your prompt reply.

        Question 1

        So if I have to change the URL of my website in addition to migrating from the host. I just use the find and replace function ( URL) of the plugin.

        I DO NOT need to manually change the URL inside the files of after export. Am I correct ?

        Question 2

        other than databases, themes, plugins, what other wordpresss content it moves ( I am comparing it with duplicator plugin, that moves complete wordpress installation)

        • Hi Faisal,
          Please see my answers:
          > if I have to change the URL of my website in addition to migrating from the host. I just use the find and replace function ( URL) of the plugin. I DO NOT need to manually change the URL inside the files of after export. Am I correct ?
          Yes, you are correct. Find and replace function is enough. No need in manual changing URLs inside the files.
          In my previous reply I mentioned manual changing URLs in your subdomains’ files because the subdomains are not affected by the plugin.
          By the way, according to Duplicator description and technical FAQ I think Duplicator works the same way (i.e. it does not migrate subdomains together with the main domain)

          > …what other wordpresss content it moves ( I am comparing it with duplicator plugin, that moves complete wordpress installation) ?
          All-in-one Migration plugin moves complete WordPress installation too.

          • Wonderful Micheal, I was able to migrate my website to the new URL with this method flawlessly. My only point would be to ask that my old domain name had a count of visitors ( i was keeping track through wordpess.com-jetpack plugin) and also had google analytics. Would the new website use the old website count. For example if the old website was giving a count of 100,000 visitors, will that be carried over to the new website. As I have some issue with the plugin , so I am not able to verify this at the moment.

            • Hi Faisal,

              I’m glad that you’ve managed to migrate your site!

              As regards your question, if you mean how many visitors will be visiting your site, then it depends. Usually, if you change your domain name, then the new website experiences a drop in visits. But after sometime it can regain to a similar level as before as Google re-indexes your new site. This info may be useful to you.

              Besides, what you may want to do is to set redirects from your old domain pages to a new domain pages. This is useful if your old domain has a lot of backlinks. And in order to keep the SEO juice coming to the old domain, you may want to set 301 redirect from your old domain to a new domain, or even set redirects from old pages to the corresponding new pages. Here is an overview of the process. You need to keep the old domain registered though.

              • Thanks Michael, Is there any free plug in that helps recover the social shares, i can now see that my social shares are reset to zero after domain migration 🙁

                • Yes, unfortunately the social shares are always reset when you migrate domains.
                  To be precise, the number of shares stay on your old domain. And the new domain simply does not have any shares yet.
                  There are some premium plugins that display on their share buttons the numbers of the shares from your old domain summed up with the number of the shares on your new domain. But technically these plugins do not recover social shares or move the sahres from you old domain to your new domain. These plugins simply make two requests before displaying the number of shares – to your old domain and the new domain and they sum up the numbers before displaying the numbers on the social buttons. You can find these plugins by searching “social shares recovery” or similar. I have not tried any of them, so I can’t recommend any plugin specifically.

  3. Hi – I just wanted to ask. I am migrating from a subdomain to the main domain:
    http://dev.brewhemia.co.ukhttps://brewhemia.co.uk

    As you can see the development site does not have an SSL cert but the new one does.

    When using the find and replace on export, do I need to include the http and the https ?

    thanks

    • Hi Kevin,
      Migrating to HTTPS is a bit more complicated thing than just using search & replace. But yes, you will need to replace HTTP with HTTPS during the process.
      By the way, this week I’m publishing a comprehensive 10K-word tutorial on migrating from HTTP to HTTPS. Feel free to subscribe to my blog updates to read the tutorial.

    • Just wanted to let you know that my tutorial on migrating website to HTTPS is ready. You can find it here.

  4. Great thanks Michael

It's important for me to know what you think

*