UpdraftPlus
Back up, restore and migrate your WordPress website with UpdraftPlus
If you have UpdraftPlus Premium, then when you restore a site, you will be given the option to “Search and replace site location in the database”:
What does this option do? If selected, then after restoring your database, it will then perform a search-and-replace operation upon it. It will first look up the address that the site was living at (i.e. the site whose database you are restoring). Then, it will replace all instances of that location in the database with your site’s new address.
This is a vital step if you are migrating a site from one location (URL) to another. For example, if you are moving a site from your development location – e.g. https://localhost/testsite to your live location – e.g. https://example.com – then after copying all the files and database, you then need to search/replace the database to reflect the new location. If you do not, then your site, though sitting at the “new” location, will contain lots of references to the “old” one. This can cause confusion and bugs. Most professional WordPress developers use the tried-and-tested “searchandreplacedb2.php” script to accomplish this task. UpdraftPlus includes the same code as its own search-and-replace engine to give you the same reliability.
So, in summary, here is how to migrate/clone a site from one location where WordPress is installed to another:
4. After the upload has finished, use the ‘Restore’ button on the new site to begin a “restoration” using the backup set that you just uploaded. Make sure that you tick the “search and replace” button when doing so.
That’s all!
You can see a fuller walk-through, with many more screenshots in our migration step-by-step guide.
Try TeamUpdraft’s full suite of WordPress plugins.
Back up, restore and migrate your WordPress website with UpdraftPlus
Speed up and optimize your WordPress website. Cache your site, clean the database and compress images
Secure your WordPress website. Comprehensive, feature rich and easy to use
Centrally manage all your WordPress websites’ plugins, updates, backups, users, pages and posts from one location