In my last post I explained about my back up routine for WordPress, I wasn’t planning on testing it out so soon, but it has just saved my bacon! The plan was to spend an hour or so tweaking the blog to make it faster, by using the WP Super Cache plug in and Amazon Cloud Front, however something went badly wrong! The alarm bells should have started to ring when I noticed that most tutorials about using Amazon Cloud Front with WordPress referred to W3 Total Cache, however I preferred the look of WP Super Cache and fancied a challenge…
I was loosely following this guide, but somehow managed to take my website offline, probably by sending requests into a DNS blackhole. The problem was this meant I couldn’t get back onto my website to turn the caching off again. At this point I would also like to add that I couldn’t test this phase on my development server, as Cloud Front needed to pull data from the blog, which meant deploying on the live site.
I could still SSH into the server, so used the WP Super Cache uninstall instructions for “if all else fails and your site is broken”. However that didn’t help. At this point I was getting a little bit more panicked, but was very glad of my new backup strategy and that I’d had the foresight to make a backup just before I’d started fiddling with the blog. I feared the worst, that I would have to reinstall WordPress again from scratch and reload my data, reading this troubleshooting guide confirmed my fears.
Reinstalling WordPress isn’t the end of the world, I have done it a number of times, but for some reason I have been having a lot of permission issues on my web server, maybe I had taken security a bit too far. This meant that I couldn’t get my FTP client to upload my backup data. I ended up revisiting the AWS WordPress installation guide and also this blog post to find the correct settings and set them via SSL. At least I’ve had a lot of command line practice this evening!
Even with the permissions fixed, I couldn’t use the restore tool on Updraftplus (possibly due to restrictions I have added on AWS?), but was able to upload the data via FTP and got the blog up and running again. I still haven’t got the caching/CDN set up, but I think I’l take the easy route now and hopefully not need to test my backups again.