August 02, 2010

Moving your wordpress blog to another domain

This is a quick sum up of steps-to-do for moving / copying your wordpress blog/site from one domain to another.
When there is always a possibility to do it more properly or elaborately, what I'm going to brush up here is a quick method of doing it.

1. Start copying your theme files to your destination host. (Let me tell you… this is the only lengthy process of the whole move). Do the following in the meantime.

2. Take a backup of your wordpress database. You can either use phpMyAdmin or backup utility from your hosting service or a direct mysqldump to do this.

             -> phpMyAdmin: Can be launched from the control panel of your hosting site.

             ->
Backup utility: Can also be run from the control panel of your hosting site.

            
-> mysqldump: Here is the command to do that from the command line (make sure that you are pointing to the correct MySql server while running this)

                         >
mysqldump -u <username> -p <database_name> --result-file=<dumpfile_path_and_name>

                        
This command would ask for your password.

3. Create a new empty database on your destination host.

4. Run the backup. Again, this could be done via either of the three options told before.

5. You would need to update two values on your wordpress options table. Though you can use a direct SQL, I would suggest phpMyAdmin for this. Login to the phpMyAdmin screen.
             Search for a table called Options in the list of all tables. Edit the following two values:
                        > o
ption_id=1 (siteurl) & option_id=39 (homeurl): You would observe that both of these contain the URL of your previous domain. Change them to the new one.

And that’s all about it!. Your blog/website is ready to be launched.

No comments:

Post a Comment