This post is the first one in a series of articles about moving your WordPress installation:
- Moving your WordPress site: same domain , new host (Current)
- Moving your WordPress site: different domain , same host
- Moving your WordPress site: different domain , new host (Coming soon)
Moving a WordPress site is a pretty straightforward process. If you need to do this, simply have a look at this page and before you know it you will be able to go back to playing party poker and relaxing. You have 2 parts: the WordPress database and the WordPress files (including your uploads / themes / plugins).
Moving the WordPress Database
The database holds all your posts / comments / pages / configuration options. Most hosts have phpmyadmin installed , so login to your control panel , and go to phpmyadmin.

Now click on the database of the site that you want moved. Click the export tab. Make sure all your tables are selected , and SQL is selected as the export. When you’re done click “GO”.
You will get a SQL extension file that contains your database.
Now it’s time to import it on your new host. Login to the control panel from your new host , and create a new database and database user (note them somewhere , you will need them later). After you’ve created a new database and a new user , link them together (add the user to the database , will full rights ).
Now you have a empty database , and a database user that can connect to it. Go to phpmyadmin and select your new database. After you selected it , you have a import tab , click it.

You have the option to upload a file , click “Browse” and select your database export (the one you downloaded from your other host). After you selected the SQL file , click “GO”.
Congratulations, your database is now moved! That’s just half of the WordPress moving process.
Moving the WordPress Files
Connect using FTP yo your site. Go to the folder that has all your files (it’s where the wp-admin, wp-content and wp-includes folders and many files are). Select all and download them to a local folder.
Now connect using FTP to your new host, and upload all your files. Be careful where you upload them , if the domain is the main domain , upload in the public_html folder , if you are hosting multiple domains be sure to upload the files where your domain name is setup.
This is it , the second part of moving your WordPress site is done.
Configuring wp-config.php
Wp-config.php is a file located on the root of your WordPress installation. Open it , and find the next lines:
[sourcecode language='php']
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘database_name_here’);
/** MySQL database username */
define(‘DB_USER’, ‘username_here’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘password_here’);
/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);
[/sourcecode]
As the code is commented , put your new database name , database username , password and your MySQL hostname(most hosts use localhost). Upload your modified wp-config.php file to your new host.
Now all you need to do is link you domain to your new host(add the domain to the hosting , change the nameservers etc) and test it.