We just finished moving our blog (the one you are reading now) from Windows Server 2003 to CentOS 5. The switch included a couple of steps, but was rather easy:
- Install CentOS with Apache, PHP and MySQL. CentOS does install Apache 2.2.3, PHP 5.1.6 and MySQL 5.0.22 by default. Make sure to “yum update” to get the latest stable packages.
- Make a backup of all your WordPress database on the original server. To do this we used the excellent “wp-db-backup“. Just backup all of your tables and download it to your machine. You will then have a backup.sql file.
- Create a database in your NEW Worpress server, rename the backup.sql file to be the same as the database and import the backup.sql file with the following command:
mysql -p -h localhost dbname < dbname.sql
Now all your posts, comments and all, are imported in the new database and ready to use. - Install and/or copy your WordPress installation. We are always using the Subversion WordPress and thus had to checkout the WordPress installation and copied our plug-ins and themes from the Windows installation to the Linux one.
- On Windows we used to have permalinks like “/2008/02/04/mypost”. To make it work on IIS we used a rewrite tool that used the same syntax as the rewrite modul on Apache. To make it work on Linux with Apache we had to do the following:
- Enable “LoadModule rewrite_module modules/mod_rewrite.so”
- Set the “AllowOverwrite” controls to “All” with: “AllowOverride All” (this is very important or else your permalinks will not work)
- Restart Apache with “/sbin/service httpd restart”
- Make the needed configuration in your DNS and Apache vhost containers.
A word on WordPress. We are really just a ColdFusion shop, but the WordPress package as a whole is really just a convincing offer, independently of the language in the back. I have never seen a blog application that is so full featured and easy to use and setup. The sheer amount of plug-ins and themes are a major plus. Anyhow, back to coding some real stuff in ColdFusion .-)

