Categories
Wordpress

Switching sites with WordPress

The move didn’t go so well. I wanted to change physical server, domain name, and folder structure, all at the same time. This may have been a bit ambitious to try in one go. To further complicate things, the domain points to a sub-domain of the main site.

Moving required a lot of search and replace jobs within the MySQL database. When you export a MySQL database it comes out as a large text file. This file contains all the MySQL commands required to rebuild it at the other end. Unfortunately, this file is so big (and contains such massive unbroken lines of text) that many file editing programs refused to even open it – much less edit it. Since I’ve not had this blog for long, my database file was a modest 180K. However, on XP neither DevStudio, Notepad, or Wordpad, could manage to open the file without problems. And even on Linux, gedit choked when trying to scroll through the contents. The only tool I found that could search and replace my domain names within the file was nano on Linux.

It took about 5 attempts to get the database created and the configuration files to match it. In the end I gave up trying to modify the directory structure and mirrored the old structure on the new server. Then I used the option to give WordPress its own directory. This makes it look like the blog runs from the root directory so the address is simply http://paul.sinnett.name and not http://paul.sinnett.name/wordpress/index.php. I guess I could have set up a redirect page but I think this is simpler.

Anyway, I’m in now and everything appears to be working fine. The permalinks are now set up too. If I move again, these addresses will stay the same so they are now cool URI’s.

By Paul Sinnett

Video game programmer

2 replies on “Switching sites with WordPress”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.