Seamless change - moved my Wordpress blog to Heroku
Once in a while it’s necessary to change. So it was last week. I moved my blog to Heroku - read here why and how.
Over the last 10 years I ran two different blogging system. First I ran a blog based on an IBM Domino database. It was for fun, for geeking, for tweeking, for fiddling around with the tech. I changed the underlying stack quite a few times. But it became tedious. Not because of the stack - but because every little change like adding comment spam check became a time-consuming task. For the time being it was ok to spent the time though.
A few years ago I moved off from the Domino based blog to a Wordpress blog. Much easier because there are thousands of addons and themes available. I ran the Wordpress installation on my home server. It survived several CentOS upgrades, the switch from MySQL to MariaDB and also the 60k hits/week of website traffic during the Outlook issues.
But now I’m sunsetting the home server. Mail moved to GMail already (yup, I ran also my very own SMTP server for 10+ years, but that’s another story). And the blog went to Heroku.
Why Heroku? And why (still) Wordpress?
I never had really any issue with my home build. It was fast, it was resilient, all good. But the blog was one of the main reasons to keep the now soon to be sunset server.
I had now basically two options:
- Move the blog to my domain vendor
- Move it “somewhere” else
Both included the possibility to stay on Wordpress - or to do something fancy like using GitHub Pages. I decided for sticking with Wordpress. It’s still easy to use, has a large community and offers a variety of plugins (if I ever need them). I rather spend my time nowadays on other tech stuff than fiddling around too much with my blog. And I’m happy to spend a few Euros for someone else’s hard work.
From the deployment perspective I was curious if and how I can run on a PaaS environment like Heroku. So far with “fiddling around with the blog, eh”… ;-)
Lessons learned so far:
- The almighty “Deploy to Heroku” button is AWESOME. It allows you to auto-deploy any correctly set up git repo as a remote source for your new Heroku app. Great for testing new some stuff very quick.
- As I’m not a huge PHP user I’ve never heard about Composer or WP-CLI. Very powerful tools. I loved the usage of the WP-CLI while being remotely logged in into my dyno using the Heroku Toolbelt.
- As the file system on Heroku is ephemeral all media needed to be migrated to AWS S3. Except I wanted to commit it to the GitHub repo and use it from there - but I didn’t.
- If you want to execute tasks like overwriting customizations to the used Wordpress theme => composer compile is your friend. It took me some tome to figure that out.
- Available Import-/Export plugins for Wordpress are “ok-ish”. After three to four runs runs everything was transferred (without errors). WP-CLI is your friend to handle the errors. ;-)