File Migration from one hosting to another

Moving a website to another host consists of the following steps:

  • Moving the website’s files.
  • Moving the website’s database.
  • Configuring your application to work at the new host.
  • Pointing your domain’s DNS to the new host.

Because this is a multi-step process, We suggest creating a backup of your Site Files and Current site Database.

A more detailed breakdown of these steps can be found below:

Transferring the files to the new host:

The most convenient way to transfer your website’s files to your new Web Hosting account is via FTP. You should connect to your hosting account and download the files locally to your computer. Then you have to upload them to your new hosting account’s main folder (usually public_html, www or httpdocs).

More information on how to use FTP can be found in our FTP tutorial.

Transferring the website’s databases:

You have to export the database content from your old hosting account (usually into an SQL file), create a new database at your new hosting company and import the information in it. For detailed information on how to import/export databases via phpMyAdmin, you can refer to this tutorial.

Or you can export your Site Database using the WP-DB-Backup plugin.

Application setup on the new host:

Transferring your WordPress application includes copying your files and database and modifying the wp-config.php file in your main WordPress folder.

In wp-config.php you should change the MySQL settings:

DB_NAME – here you should enter the name of the WordPress database, e.g. :

define(‘DB_NAME’, ‘user_wrdp1’);

DB_USER – here you should enter the username with privileges to access the blog database, e.g. :

define(‘DB_USER’, ‘user_wrdp1’);

DB_PASSWORD – the password for accessing the database:

define(‘DB_PASSWORD’, ‘password’);

DB_HOST – the MySQL host; in most cases you won’t have to change this:

define(‘DB_HOST’, ‘localhost’);

In case you wish to use the transferred application with another domain, or in another folder, you should also change the siteurl and home options in your WordPress database. You can do this using the phpMyAdmin tool available in your cPanel.

Once in phpMyAdmin, select your WordPress database and browse the table wp_options. Find the options siteurl and home and change their values to the desired URL.

DNS changes

Finally, you have to change the nameservers for your domain name to point to your new host. This can be done at your domain Registrar.