To make the long story short: this week I moved my blog to a new web host. And I was surprised and pleased with how well and smooth everything went. But I’ll don’t just let you alone here. I’d like to explain the how and why I moved.
When I started with WordPress as my blogging platform, it was all just fun and games. Nothing technical, no helpful blog posts, just tinkering around, having fun writing. But with my engagement in the IT community, with my career in IT, I have rethought. I stopped playing around, and I started writing actual helpful blog posts. I started to write in German because this is my native language. At some time I switched to English, not without a reason (or more actually more than one). I have often dealt with English-speaking customers, with hotlines from international companies. And today at my current employer, English is the de-facto standard when opening tickets internally, or talking to other people in different time zones. I switched to English because most of the IT people I know, personally and on various social media, are native English speaking or understand English. Maybe I also switched because of reaching more people with helpful blog posts. And when I check the blog statistics, most visitors are from the United States. So, not a wrong decision at all, switching to English.
But enough of the forewords.
When I moved my blog from one host to the other back in the days, I was looking for more speed. If you know WordPress, then you know it’s all PHP and MySQL, which can be highly dynamic content. And from a webserver perspective, dynamic content can’t be delivered as fast as static content. But, in my humble opinion, that was back in the days when there wasn’t much SSD storage in the webservers, or it was expensive, or with old PHP versions, etc.
My previous web host had also WordPress, but not the traditional way. He offered static WordPress hosting, which made me curious, and I wanted to give it a try. You’ll get a WordPress instance which you can start whenever you want, write your blog posts, do the other stuff, and shut it down. After that, you’ll create a so-called artifact, which renders all the dynamic content from your blog into static files. All your text, CSS, and JS files, images, etc. will then be put onto Amazon CloudFront automatically. And that’s the static content you’ll get presented when visiting the website. The performance was good, good enough for me.
But it has also some downsides. Some native WordPress features, like comments, search, or some plugins, just don’t work like this. They can’t be static because they relate to the dynamic WordPress in the backend. I had to find solutions for many problems. And I’m still not sure, even if I was able to test it successfully if it really worked.
I decided to move back to my original web host, where I have my domain running since 2008. Not only because of that but also because of the aforementioned circumstances. I’m also born in Switzerland, and my blog has a Swiss TLD (.ch), but with that TLD it’s still (highly) visible also international. My new web host caught me with a good hosting package, which has 250GB of website storage and is backed by 100% NVMe SSD, with Nginx and Apache running in parallel, 50MB of Nginx cache, and many other things. And that for a reasonable price, at least by Swiss standards. Yes, it may be true that many things are more expensive in Switzerland than abroad. But not everything.
That’s the why.
First I created a subdomain to play around with and to not screw anything up in production. I had to do some research on WordPress migration because I felt that I was a little rusty. I mean, you don’t move WordPress instances from one host to another each and every day (except when you’re working at a web host or working for customers with WordPress. You got the point.). I’ve found an awesome plugin, and this plugin is worth every buck. The plugin is basically free but has some limits. For smaller blogs (below 500MB in total size) it might work, but for heavier loads, you have to open your wallet. Not much, but just a bit. The plugin in question is All-in-One WP Migration and is available on the WordPress plugins site. As mentioned, the free version has some limits. For a one-time exchange of money for goods, you’ll get the unlock of this plugin so that you’ll be able to also lift and shift bigger loads.
First, you have to create a backup of your WordPress instance on the source with that plugin (the free version is enough here to make a backup!). It handles everything, the blog posts, the database, even the plugins, and themes are backed up. On the target, you have to launch WordPress, install this plugin with the paid unlock, and just import the backup file. Easy as pie.
I’ve mentioned my subdomain for testing. I just imported all the stuff onto that subdomain. And everything worked. No broken display due to missing plugins or themes, no blog post lost. Just as it was on the source site, but only with another domain. The only thing that didn’t work was the login. I don’t know why. Maybe due to security reasons, the passwords are not migrated but the user accounts. But with phpMyAdmin, I was able to set a new password for my user and could instantly log on to my WordPress. And it felt good.
Ok, the proof-of-concept was working fine, everything looked good. I tore down everything at my new web host and started from scratch. I created a new empty website, installed WordPress, imported everything, and changed the DNS records. It took me roughly half a day to move my blog, including research and creation of a PoC.
And that was the how.
Elon Musk sure does like his movie references. He is apparently a huge fan of Star Wars. A user once dropped that question into a Twitter thread, and Elon offered a three-word answer.
But he likes also Spaceballs. So do I, I love this movie (spoiler alert!).
My website is now running even a bit faster than it was before! The result pleased me much, but it also shows that my blog was already in a good shape, and there was not much to optimize.
Ka-boom! Ludicrous speed activated! My blog goes plaid! You’ll get the point if you know Elon Musk and Spaceballs and if you may own a Tesla. And I’m sorry for the 90’s style Gifs at the end of this blog post 😉