How to move/transfer WordPress website through FTP?

Regardless of the reason, most of people are gone through the stressful experience of moving a WordPress website to another host. What we believe is, WordPress website migration can be straightforward only if you perform it carefully and follow the correct approach. Here we have described the most common method of WordPress migration, i.e. FTP method.

Backup your WordPress website:

To be on safe side, take full backup of your WordPress website before you make any changes. Now, copy all your WordPress files including .htaccess to your local computer either through FTP or through cPanel.

Export Database:

  • Login to your cPanel and go to phpMyAdmin.
  • Select the database you have been using for WordPress website.
  • Click on Export on top of the page. Keep the default Quick option and press Go to download backup of database to your local computer.

    Export Database from phpMyAdmin


Create Wordpress database at new host:

  • At cPanel, go to MySQL Database.
  • Create a New MySQL Database.
  • Create new MySQL User.
  • Add User to the database and grant All Privileges.
  • Keep these database details handy, you will need to replace them in wp-config file soon. 


Edit wp-config.php for newly created database:

Now, browse the folder where you downloaded your WordPress website files and locate the file called wp-config.php. Before you edit the wp-config.php, keep a copy of it as safeguard. Replace the database login details (you just created in above step) in file wp-config.phpNow, update the following lines with database, username and password.

define(‘DB_NAME’,’db_name’);

define(‘DB_USER’,’db_user’);
define(‘DB_PASSWORD’,’db_password’);

Import Database:

  • Open phpMyAdmin and select newly created WordPress database.
  • Click on Import tab at the top of page.
  • Under File to Import, select database fiile which we exported earlier.
  • Under Partial Import Option, Uncheck option of “Allow the interruption of an import in case the script detects it is close to the PHP timeout limit". Click on Go.

    Import Database from phpMyAdmin


Upload WordPress file to new host:

Now using FTP, copy your WordPress website files at new WebHost in root directory(public_html).

Edit database(Edit Site URL):

After migration, to make images and posts linking work appropriatelty, you’ll need to update your domain name database. Just opening wordpress database and updating it won't work as it may break any serialized data.

Hence, you will need a script that will preserve serialized PHP strings when performing a search and replace. You just need to upload this script to your website, scan all the tables and then input what you want to find (your old domain name) and replace (your new domain name).


Configure DNS Setting:

Once everything is set, change the namservers(or A records) of your WordPress website to point it to new web host. After almost 48 hours of propagation time, your Wordpress site will be up and running.



  • 4 Users Found This Useful

Was this answer helpful?

Related Articles

How To Fix An Error "SSL certificate problem: unable to get local issuer certificate"

This error can be encountered while upgrading WordPress or installing a WordPress plugin from the...

How to Fix White Screen of Death Error in WordPress?

Everyone who is involved in WordPress development must have faced this annoying white page...

How to Fix the 500-Internal Server Error in WordPress?

So you have been receiving 500 Internal Server Error in your WordPress website? Don’t panic, have...

How to install WordPress

How to install WordPress This tutorial will show you how to install WordPress. For this...

How To Fix An Error "The Uploaded file could not be moved to WP-Content/Uploads" folder?

Sometimes you receive following error while trying to upload new Media/Images to your WordsPress...