Transferring wordpress websites from one domain name to another

moving wordpress websitesSometimes you need to move a wordpress website between servers. Sometimes it’s as straightforward as changing your service provider so most of the steps below can be ignored as you’re not going to be changing domain names. This guide is more for the people who are moving from a development environment onto the live website.

I have read how to do it with plugins but the below method will work. It can, very occasionally, do some strange things with widgets and menus. This probably happens 1 time in 20 transfers but it is something to be wary of.

Before you continue, you will need the following

  • A ftp client. I use filezilla but you can choose anyone you feel better with
  • A text editor that will allow you to do search and replace. My favourite is notepad++
  • Access to a mySQL database. This is normally via a cPanel from you host.

I’m going to assume that you know how to use ftp and have your username and password at hand.

We will me moving our website,, to If you’re just moving your domain from host A to host B then ignore any steps that mention changing database information [ Step 6 ]

Step 1
Download your current website.

Connect, via ftp to – it’s probably going to be but that maybe different on your host. Go and get a coffee as this is going to take a while to download.

Step 2
You will need to get a copy of the MySQL database. This is the system that runs your website. You will need to log into your website via, in my case, cPanel. I’m going to assume that you have the same.

Step 3
Now you are in cPanel, look for something called mysqladmin, or something similar. Click on it and you should now be in the database that your website is using.

Step 4
Download the database.

This is very easy. Look, at the top, for the “export” tab. Click this. You should now be given a page that will allow you to save your database. You shouldn’t need to make any changes in here apart from clicking the download button. In some versions you may have to click “save to file” check box. Save this to somewhere you can easily find. Your desktop is a good place.

Step 5
Make a copy of the file. This isn’t vital but this is something my little paranoid brain forces me to. It’s about 20 years of working in IT does to you.

Step 6
Open the file in your text editor.

The file should be called, something like database_name.sql

Search for “” ( no quotes or slashes ) and replace it with your new domain name, in our case “”
remember to now save the updated document.

Step 7
Now log into the cPanel of where you will be moving your website to.

Step 8
Create a new database, and user. I’m not going to tell you how to do this as with some hosts this is done differently to how I do it. You will have to find how to do that yourself… Sorry ๐Ÿ™

Step 9
Upload the database. It’s actually importing it into the new one but that’s just being picky.
Find the mysqladmin button and click on that.
In mysqladmin, look for “import” and click on that. That will goto a page that allows you to upload a file. Click on Browse and find the file that you edited in step 6. then click the “Go” button and you should now have your database uploaded.

Just two steps to go.

Step 10
edit wp-config.php – this file is in the “root” of the directory that you downloaded in step 1.

Look for the following lines in the file:

Alter the DB_NAME. DB_USER and DB_PASSWORD to what you set up in step 8. You shouldn’t need to alter DB_HOST as it’s normally set as localhost.

Remember to save the file!

Step 11
This is the final step.

Upload the website to your new host.
Basically just do step 1 in reverse!

Now check that your website is now working on the new domain!