Bye Azure! Hello AWS

I’ve decided to move from Azure to AWS EC2 for hosting. To be honest the service at Microsoft Azure has been lackluster at best. No support and crappy performance. There are times when the machine is just simply unresponsive. AWS T2.Small instance size is pretty snappy and around the same money. In addition, Amazon offers a nice RDS service which includes backup and management. Yes, this increases my hosting cost, but it comes with better performance. My CDN is hosted on Cloudfront anyway, so hosting the server in EC2 makes sense.

Amazon RDS is not easy to setup. The first time I configured it a couple of weeks ago I had to invoke Amazon support to figure out which security setting was messed up. I wound up leveraging that today to finish the migration.

bitly = brokely

Well, all was working until I posted… then the bitly plugin crashed the site. No amount of re-configuration would make it happy. Fortunately, deleting it was easy and fixed the problem. I noticed there was not a new version, so that suggests it wasn’t working well.

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!