Transfer wordpress to another (different) server

Transferring a Wordpress site to another server that runs cPanel.

Following these instructions will smooth the process of transferring or migrating your Wordpress site to another server.


First things first. Check and make sure that you have an Administrator username and password for your Wordpress site to be able to add or remove users and reset individual passwords etc. You don’t need it right now but you will need this once the successful migration of the site’s completed.

Also, just generally check the original site and that everything’s working as it should. Log in to it using the aforementioned Administrator password (just to check).

If we’re happy with the way the site is working then we’re good to go.

You may have been given all of the (Wordpress) website files and the associated .sql (Structured Query Language database file) already for migration.

If you haven’t already, make a back-up of your site. Use an FTP program to download all of the files in the root directory of your website by transferring them to your computer.

Make sure the .htaccess file has been copied across as it’s generally set to not be viewable. Alter your FTP program’s settings to have it display hidden files if you are unable to see this file.

Now download a copy of your Wordpress .sql database file

Log into your server's cPanel and select your phpMyAdmin

phpMyAdmin to export your Wordpress database


Select the Wordpress database you want to export from the left hand column and then choose Export from the main menu.
Export it with the Export Method:Quick and the Format as SQL
Then press GO

phpMyAdmin Wordpress transfer to another server

You have now saved a copy of the .sql (Structured Query Language) file of your Wordpress database.

That’s all of your website files and database files dealt with. You now have a copy of your Wordpress website on your computer.

Duplicate these files and save one as a BACK-UP!

Transfer your Wordpress site to a new server

Firstly we need to create a database to insert your .sql file. Use MySQL Database Wizard to perform this task.

phpMyAdmin Wordpress transfer to another server

Make a note of the
Database Name:

that you create. These details you will need for the next step.

Select: ALL PRIVILEGES for your newly created user.

Now we have a new database we can begin the .sql import process to populate it with the Wordpress site's files.

Import your .sql file to populate your newly created database

phpMyAdmin to export your Wordpress database

Open phpMyAdmin from the cPanel software on your new server and select your new database name from the list on the left hand side. Once open select the Import tab from the navigation menu.

Choose the .sql file to import

Un-tick the Partial Import check box and make sure the format is set to SQL and then click the Go button to import your file.

Depending on the size of your .sql file this can take some time to import

phpMyAdmin to export your Wordpress database

Point your Wordpress site to your newly created database

A wp-config.php file should be in the root directory of your Wordpress website.

We need to open it and change the settings so that it points to your newly created database.

Open wp-config.php in a simple word editor and replace the following with the details you set earlier

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for Wordpress */
define('DB_NAME', 'putyournewdatabasenamehere');

/** MySQL database username */
define('DB_USER', 'putyourusernamehere');

/** MySQL database password */
define('DB_PASSWORD', 'putyourpasswordhere');

/** MySQL hostname */
define('DB_HOST', '');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

wp-config.php settings for accessing your Wordpress database

With the database connection set we just need to configure the home and siteurl’s and turn on error reporting to help us debug the pages later on.


* For developers: Wordpress debugging mode.
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
define('WP_DEBUG', true);
define('FS_METHOD', 'direct');

wp-config.php settings for accessing your Wordpress database

With those changes to the config file completed upload your new config file along with the rest of the site.

Useful links on the subject of transferring a Wordpress site to a different server



Please share if you find the content useful - thank you

Master Template World


Master Template Forum Robot


Have a comment or something to say?
Say it here…

[privacy policy]