It’s been a while, hasn’t it?

Back in 2013 I had some issues with my blog. I didn’t update WordPress often enough and some bad sorts-of-folks got into our server. Mr Coffeemuffins was not happy. So in order to remove the issues with hosting a php server I moved to a static blog based on a local instance of WordPress.

However it was difficult to manage: every time I tried to post I found another issue with the plugins to upload the static site to s3. Eventually I stopped even trying.

Fast forward to Christmas 2015 and I decided enough was enough. If I was going to have a blog, it damn well needed to be updated every so often. It also needed to look loved; I’m in the software industry – it looks bad to have a website that looks so obviously 2012.

At first I tried to resurrect the static blog, but none of the plugins had been updated in years, and the replacements I found didn’t seem to work either.

A new approach was necessary. Static wasn’t working for me; I needed to host my blog somewhere. I could have moved to one of the other static platforms but I still liked using WordPress. I decided on EC2 mainly because having more experience on AWS would check some boxes for me professionally too.

I ended up following this tutorial on how to install wordpress on EC2 backed by EBS. For reference I had an initial abortive attempt not using EBS, but it seems that if you want automatic backups EBS is the way forward.

I use a t2.micro instance (part of the free-tier of AWS), which given my blog’s current level of traffic seems more than sufficient.

However, just before I was about to announce to the world my return, my website got slow – deathly slow – then it stopped responding and eventually crashed all together.

Google led me to many blog posts suggesting I wasn’t running a high enough powered instance and that I would need to customize all the settings for mysql and apache. I made many changes but it only got worse.

Actually the root cause was a lot more simple: I was experiencing a DDoS attack, believe it or not – welcome back to the internet, Lauren.

With some help from Mr Coffeemuffins we managed to resolve it fairly quickly once we knew what the problem was, and now while not blindingly fast, the website is at least functional again.

After this detour into htaccess, I then followed this tutorial on how to set up daily EBS backups. I have a cron job which runs daily to keep a snapshot of the current contents of my server, which means I can launch a new instance with the previous day’s copy within a couple of minutes in an emergency scenario.

Lastly, during the whole move from static, to local, to new EC2-backed wordpress I had lost links to many of the images embedded in my posts. They linked to localhost:8888 which of course didn’t resolve; luckily during my static phase I had everything uploaded to S3 and I’d enabled CloudFront, so I used this Better Search and Replace plugin to swap one link for the other.

So is my blog perfect? No, I am sure there are many lurking issues, but is it better? Definitely.

I have even put up some new recipe posts in the past week. 🙂

Other tutorials I found useful:

  1. How to bulk remove featured images posts in WordPress
  2. Hosting WordPress on AWS
  3. How to install LAMP on AWS