Subscribe via

Setting up a FreeBSD 6.2 Web Server: Migrating WordPress from WinXP to FreeBSD (Part 3)

Background

I previously made a an awfully painful choice to host this site on my WindowsXP machine using WAMP (FYI, WAMP = Windows, Apache, MySQL, PHP packaged into one install). WAMP and I had a 10-month-long love-hate relationship:

Month 1

- WAMP quickly attracted me with its sexy promises of hitting it off quickly.
– There was no need to set up a separate OS/machine and learn it.
– I loved the fact that it took me less than 30 minutes to get my server up.
– Website administration is a lot easier since it’s on the local machine.

Months 2 – 10

- I had to set up VNC, FTP, and SSH to be able to remotely administer my website if I am not home.
The longer Apache and MySQL processes stay alive, the more memory they hog (memory leaks). I had to keep restarting the services every day to maintain acceptable performance.
– Windows keeps crashing or auto-updating causing my server to restart without notice. I had to turn off auto-update. As for the random crashing, all I was able to do was hope that it won’t crash.
– WAMP started to get fat and lazy once I added more content into to the site. I had 8 second page generation times!
– When I tried to follow optimization guides for Apache, MySQL, and PHP, I found out that Apache packaged with WAMP had limited httpd.conf functionality. I tried MySQL optimization and it did not help the time much. Lastly, I could not find a PHP accelerator software for windows PHP5. This was the straw the broke the camel’s back.

As you can see, this story is like the story of meeting a supermodel girl. She might be fun in the beginning but after the first month, you find out that she’s actually a high maintenance airhead who doesn’t know how to do anything but strut her stuff. After 10 months I was ready to get myself a house wife that will cook, clean, and quickly serve pages.

How I Broke up with WAMP

Here is a general outline of the steps I took to migrate my site over from Windows XP WAMP platform to FreeBSD.

  1. Upgrade WordPress: Lazy me, I had an older version of WordPress. I had to take this extra step to upgrade my WordPress because the newer version will most likely make modifications to MySQL.
  2. Export old MySQL data: You can either do a mysqldump or you can be chicken like me and use phpMyAdmin to export everything in my old MySQL server to a localhost.sql file.
  3. Import data to the new MySQL server: On the command line of the FreeBSD machine I did:
    mysql -u root -p < localhost.sql

    Of course this did not work the first time. It might work for you the first try but in my case, I had an error about root not being able to access some of the tables and databases. I had to go and modify localhost.sql and add GRANT permissions for “root”@”localhost” to all of the tables & databases. After I did that, everything imported fine.

  4. Migrating WordPress: I copied all files over from the old machine and everything worked like a charm (Keep in mind that I kept my database users/passwords the same). Also, MAKE SURE YOU BACKUP EVERYTHING BEFORE YOU DO THIS!

I was FREE AT LAST!

Save and Share
StumbleUpon
Reddit

One Response to “Setting up a FreeBSD 6.2 Web Server: Migrating WordPress from WinXP to FreeBSD (Part 3)”

[go to last comment]
  1. Recapping: Setting up a FreeBSD 6.2 Web Server | OMNINOGGIN

    [...] Migrating WordPress from WinXP to FreeBSD [...]

[go to first comment]