Moving your Wordpress blog : Simplysimple.info

Moving your WordPress blog

By | Posted, August 6th, 2010 and modified on October 4th, 2010.

Ever have your WordPress blog stop working with a database connectivity problem when you shifted hosting or changed the IP address of your server? This has happened to me numerous times -especially when using WordPress as a platform for an Intranet. Changing the IP address of the server for any reason has devastating consequences. This post deals with self hosted instances of WordPress on your own Linux server or on that of your web host. I have used MySQL query browser to access the WordPress database. You can also do this through PHPmyadmin or any other database editing tool. If you are proficient with MySQL commands, you can do this instead from the MYSQL command prompt on the server console or through SSH. In addition to this you need FTP or SSH access to your server for editing the WordPress configuration file wp-config.php.

Edit the 'wp-config.php' in the root of your WordPress installation directory. In this screenshot I am using Winscp (from a Windows machine). You can also use SSH (Putty from Windows) or FTP for the same.

As shown in the above screenshot, replace your old host name with the new one. In my case, the host name is an IP address. Remember that this host name is not necessarily the link to your website -unless both your database and web server are running on the  same machine. This hostname is the name/IP address of your database (MySQL ) server. So you should change this only if you’ve changed your database server as well. In my case, everything is running on a single server, so when I change its IP address, I need to change the database host here too.

From here onwards, I am using the MySQL query browser for editing the WordPress database options table.  As mentioned before, you can also do this through   phpmyadmin or through the MySQL command prompt or any other tool which lets you connect either locally or remotely to your MySQL server. The MySQL query browser has been now replaced by the  MYSQL Workbench, but is still easier to use that the more comprehensive MySQL Workbench.

Connect to the server with a user account that has read/write access to the database.

Click to Enlarge

  1. In the right pane under your database name, expand wp_options and then option_value
  2. Click on the Execute button
  3. Click on the Edit button
  4. Change the option_value for option_name siteurl to whatever your new site URL is (again in my case, it is an IP address. You will need to change this only if you are changing your domain name too. If you are shifting hosting, you will need to change only the database server name as shown in the first screenshot)

Now you need to scroll down until you come to the option_name home.

Click to Enlarge

For the option_name  home, repeat what you did in  Step 4  above, and then click on the Apply Changes button (next to the Edit button) to save your changes.

This should get your WordPress blog up and running again :-)

 

Related Posts

  1. Setting up automated backups for MySQL on Linux
  2. Webhosting and your MYSQL data
  3. Solved: wordpress Fatal error: Allowed memory size of 33554432 bytes exhausted
  4. Ubuntu Server 10.04 LTS Installation
  5. Syncing data between two Ubuntu servers using rsync
  6. Networking basics
  7. WordPress Warning: Unexpected character in input: ”’ (ASCII=39) state=1 in /home/
  8. Components of a Network
  9. How it connects together
  10. Networking Simplified

Comment on this post

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

What is 11 + 14 ?
Please leave these two fields as-is:

+(reset)-
Follow me
© 2009 Simplysimple.info webmaster simplysimple.info