migration drama o rama

It’s been a while since I posted. I’ve been very busy remodeling my house. I do have lots of projects on my to-do list, so I’ll start posting again. I had to do some housekeeping before I started posting. First things first, my OS was failing to update. After digging into it, I realized the issue was that I needed to upgrade as I was running 13.04. A few hours later I realized I couldn’t upgrade and would need to reinstall. Thanks Ubuntu!

Fortunately, I host in Azure, so rebuilding is not a nightmare. First try was a colossal failure. The WordPress migration documentation sucks. I’ll cover that later. Second try was better, but still a failure. Third time was the charm, but I got stuck in the bear pit of security I had setup. I locked down my wp-admin directory with .htaccess. This creates a separate layer of security to protect the administrative functions. No site is totally secure, but you can usually make yours more of a hassle to break into…… which makes someone else more attractive.

It took me the better part of a day to migrate my site and update my files. That is awful and I can only imagine the headache a mere mortal would experience. I’m an IT professional with 20 years of experience and deep migration expertise. So if I am struggling, it’s going to a nightmare for most quasi-admins. Now, freely I’m not a Level 10 magician in Linux…. but I’m dangerous enough that the gremlins run at the mention of my name. lol.

One of the tools to success is keeping notes in a text file on how you setup a system. It aids the memory 12 months later when you have to re-do it. Always update these “recipes” and include references to where you found things so you can review again if needed.

Without much ado, here is my high-level recipe to migrate WordPress:
– Backup your current database and /var/www directory. Make a tar file of your /var/www
– If your host supports it, make a image backup of your server. This makes it easy to go back to that system state.
– Install new server, run updates.
– configure your virtual server and make sure it works.
– Install Apache and make sure it’s working. Basically follow the WordPress setup docs here, but don’t actually install wordpress or download it.
– Make sure PHP runs, install Mysql, lock it down, create a blank database with the same name and user/password as your old server.

– extract your tarball in /var and it will recreate your permissions and folder structure complete with usernames. You’re half way there.
– Login to mysql and import your database from your backup file.
– Your blog will run at this point. Check it.
– Now make sure you have backend access. If you have .htpassword enabled you may need to reset that up or disable the .htaccess file for wp-admin.

That’s it in a nutshell. The part about backing up is not in the damned WordPress CodEx which was written by a politician to apply to everything and be specific about nothing!

Leave a Reply