How to Migrate WordPress Site to a New Domain Name


    Although it is not very common, sometimes you may need to migrate WordPress site into a new domain name with the same content. Migrating one WordPress site to another site (and name) is a bit difficult and tricky. Therefore there are some WordPress migration plugins available for moving WordPress domain, that makes life easy! But they are usually paid software.

    In this guide, I’ll try to help in moving your WordPress site to a new domain name at zero cost, if you are having basic WordPress and Cpanel familiarity. If no, search for automated migration software in Internet.

    Table of Contents

    Step-0 – Assumptions

    Step-1 – Backup, Before Migrate WordPress Site

    Step-2 – Install UpdraftPlus Plugin

    Step-3 – Backup Your Site with UpdraftPlus

    Step-4 – Setup Your New Site

    Step-5 – Restore to Your New Site

    Step-6 – Change Your Database

    Step-7 – Change Internal Links

    In this guide I will use: — My old domain name and site or – My new domain name and site

    Step-0 – Assumptions

    • Your site is UP and Running with your old domain name
    • Your new domain name is registered with a name registrar or you had created a sub domain
    • Having access to WP-ADMIN of your old site
    • Having access to Cpanel of your Web Server
    • You have familiarity with basic Cpanel operations
    • You have familiarity with creating add-on domains

    Step-1 – Backup, Before Migrate WordPress Site

    Before starting migration, you must backup your site (Both files and databases). However, most of the Cpanels allow you backing up your site. Do it!

    Step-2 – Install UpdraftPlus Plugin

    UpdraftPlus Plugin is a perfect backup software for your WP site. Therefore you can use it regularly to backup your site. If you have not tried it, examine it.

    Firstly, go to Plugins page in your Dashboard and search for “UpdraftPlus” plugin and install it.

    UpdraftPlus Plugin to Backup WordPress Site

    Step-3 – Backup Your Site with UpdraftPlus

    Activate the Plugin and go to “UpdraftPlus Backups”. Since you run it first time, there is no previous backup. Click on “Backup Now” icon and proceed with default settings. Finally you will have a full backup of your site. (including your files, plugins, databases and other necessary files – exact copy of your site!)

    UpdraftPlus Plugin to Backup WordPress Site

    At this point you should save all 5 backup files to your Local PC by clicking all of them individually. Certainly don’t forget where to save them, you will use them!

    Migrate WordPress Site

    Step-4 – Setup Your New Site

    After backing up of your old site, we finished all necessary stuff in your old site and we are ready to setting up your new site.

    Setting up a new site may change from one Hosting provider to other, but if they are using Cpanel, it’s very easy! Firstly, Go to Add-on domains (if your new domain is style) or Sub domains (if your new site is style). Here, the point is that, in both way you should choose to create new Home Folder – other than existing ones – to store your new site files.

    After that, go to Softaculous WordPress install in Cpanel. Install WordPress for your new site name. Choosing an easy remembering name for new Database may be good for you!

    Finally you will have a running fresh new site with it’s new site name.

    Before Transferring WordPress Site

    Step-5 – Restore to Your New Site

    You have a fresh WP site with default configuration. After that go to and login with your new admin password.

    As described in Step-2 Install UpdraftPlus Plugin. We will use that Plugin to restore old site. When you run that Plugin, you will not see any existing backup.

    In order to show previously saved backup files to Plugin, we must upload all of the files that are saved to your local PC, in Step-3. Easiest way is going to Cpanel and open File Explorer. Choose your home folder of your site (in my case and wp-content\updraft. This is where our backup files must be copied. Copy all of 5 backup files (names starting with backup_***) from your Local PC to web server.

    Alternatively you can use your favorite FTP client to upload files from your Local PC

    After copying your backup files to Web Servers wp-content\updraft folder you will see that Backup in Updraft Plugin. Now press “Restore”. This will restore all of your old site’s files to new site.

    If you are hosting your old site and new site at the same Hosting Provider consequently you can copy files from old site to new site by using Cpanel File Explorer directly!

    Step-6 – Change Your Database

    At this point we need to change your site names in WordPress Database. Open your Cpanel and locate and run phpMyAdmin. When its opened choose your data base (it will be easy to find your database name if you give it an easy remembering name, as mentioned in Step-4)

    Locate wp6s_options section (name can be different but you must see options) at left side and expand it. There are 2 lines, one “siteurl” the other one “home”. The values of that entries shows your old site name and addresses. Change theme to new ones.

    Modify WordPress Database to Transfer

    After all you have (almost) finished your migration! Open a browser and check your site!

    As you may notice, your new site have some links or images that are pointing and using old site. Since your old site still up and running, there is no problem now. But when you shutdown old site, that links will be broken. For this reason you should change all of that links.

    If you have relatively less (5-10) pages, you may go each page, open it, choose “Code Editor”, select all and copy/paste them to Windows Notepad. In Notepad find/replace all of your old site names with new one:

    (Find / Replace : –> )

    Similarly copy replaced code and paste it to WordPress Code Editor and do it for all of your pages!

    As I said, you can do this method for small sites but not for moderate and big sites! Therefore, if you have a that kind of site, you should automate this.

    Here I can advice a Plugin, called “Better Search Replace“. Usage of that plugin is very easy and fast. The thing you must be careful is that you should select all of the tables and unselect “Run as dry run?” option. (Default is find only, not replace)

    Better Search Replace Plugin

    That’s all! You should have a running migrated site now.

    Transferred WordPress Site

    How useful was this post?

    Click on a star to rate it!

    Average rating 4.8 / 5. Vote count: 4

    No votes so far! Be the first to rate this post.

    Leave a Reply

    Your email address will not be published. Required fields are marked *