I’m now on SiteGround!

I'm now on SiteGround!

Finally I’m on vacation. Which ironically finally gives me time to migrate my website, something that I have been wanting to do for several months. While you might think that I spend too much time with WordPress, I have to say that there is nothing stressful to me about doing some of the things that I wouldn’t be able to otherwise – rest assured that I’m spending enough time sitting in the sun, dining and doing nothing. ☀️

Alright, the reason I’m writing this post is simply that I would like to share a tiny bit about what I did. This website as well as all my other sites, more or less related (for example I have a cocktail blog y’all should follow) are now hosted on SiteGround (capital_G_dangit()!). Previously I had all these sites hosted with Google Compute Engine for a little more than a year. This was an interesting experience for me that I had wanted to do, since it allowed me to learn a little more on how all the internals of maintaining a web server setup works, without being too complicated. If you don’t know about Google Compute Engine, it’s basically a lot similar to Digital Ocean, however it runs on Google’s infrastructure and is part of Google Cloud Platform, which can be compared to Amazon AWS. Anyway, all of this helped me learn a lot, but it was also obviously more work than usually, so I’m happy I’m back at a regular host now that keeps things for me simple. Another reason that I’m happy that this experiment is now finally over is that it was quite an expense and oversized for my needs – at this point I’m good moving back to a shared host for this. I would have done that sooner, but then again, I needed a relaxed environment and time to do it.

There were several reasons I chose SiteGround: Many friends from the WP universe had recommended me to go with them, so I compared them to other hosting providers. In the end, their amazing dev-oriented features in the GoGeek plan convinced me. I get SSH access with WP-CLI, Git, Composer and other neat command line tools available, a modern environment out-of-the-box with PHP >= 7.0 and automated Let’s Encrypt certificates. My personal favorite though is that they include Memcached in that plan, an external object cache that makes your website incredibly faster as it results in way fewer database requests. Something like this is a must-have for bigger websites and also if you have your own server to manage (like I did before on GCE). However, it’s very rare to find in a shared hosting plan, I personally didn’t see any other provider that offered this in a plan that cheap.

So yesterday night I migrated everything over. Since I have my entire setup in a multisite (more precisely a multinetwork) that uses Composer to manage all of its dependencies, this was a rather straightforward process. git pull and composer install on the new server, and the data was there. There were very few changes I had to make in the codebase: For connecting with the external object cache, I’ve been using the solid WP Spider Cache plugin by my friend JJJ. I had to tweak my object-cache.php and advanced-cache.php files a bit in order to set the correct port for my new environment. Furthermore the plugin expects you to have both the Memcached and the Memcache PHP extensions available, however SiteGround (as well as many other hosts) only provides the Memcached class. Both classes are basically a variant of doing the same thing, with Memcached being the more modern and better maintained one. Since the plugin only uses Memcache for gathering detailed cache insights, I was quickly able to hack the requirement out there (please don’t do it, this was an “emergency”) – of course I also submitted a pull request for this in the WP Spider Cache GitHub repo. While SiteGround provides its own plugin for doing all the cache-related stuff plus a few other things, I didn’t want to use it as I think the way it works is pretty much terrible (it manually writes the object-cache.php file for example!). So if you’re on SiteGround and are interested in using WP Spider Cache on it, feel free to ask for more details. Other things I did included removing my own WP Encrypt plugin which I had used before to generate Let’s Encrypt certificates (obviously not necessary any longer since now SiteGround handles this).

The other things I did were mostly the common migration tasks. I took care of exporting the database from Google Cloud SQL and importing it over to SiteGround’s MySQL server manually, and the media files I copied over as well. I added my domains in SiteGround’s cPanel and generated Let’s Encrypt SSL certificates for it. The last thing was to switch the nameservers for my domains (which I manage through Namecheap) from Google’s to SiteGround’s – and then it was done.

Something else that I’ve been wanting to do for a while is outsourcing my image files to an external object storage and CDN. The reason is improved performance on the other hand, a decentralized location for my media files on the other hand: If I ever migrate again, I don’t need to migrate my media; if I ever grow that I need multiple servers and load balancers, my media is already prepared (the latter is probably less important at this point, but don’t destroy my dreams! 🙂). Regarding the service to use, I trusted the quality of Delicious Brains’ WP Offload S3 plugin and decided to go with Amazon S3 and CloudFront for storing the data. It took a bit of time to set this up properly (mostly a fault of Amazon though, not the outstanding plugin), so now all my media is located at a nice custom subdomain that points to CloudFront.

For completeness, let me list the most important plugins I’m currently using for my setup:

  • Antispam Bee (German legal alternative to using the popular Akismet plugin)
  • BackUpWordPress including its Google Drive extension (neat plugin by Human Made which I use for database backups)
  • Give (for my donation form)
  • Mailgun (well, for emails, that’s probably obvious)
  • The SEO Framework (will probably move back to Yoast SEO soon)
  • WP Offload S3 and WP Spider Cache (as mentioned before)
  • several other third-party plugins that are too specific to mention them here
  • several custom plugins, for example for listing my wp.org plugins and community events that I’m attending, or showing that neat list of my latest props that you can see on the right (if you’re interested in how any of this works, feel free to reach out)

Now, there needs to be at least a very tiny bit of negativity in this post: Since I’m using a very custom WordPress setup (composer-managed, core in a subdirectory, custom wp-content directory, several must-use plugins and dropins), some of SiteGround’s advanced features do not work for me, such as its Git or Staging modules. However I handle these differently anyway, so I didn’t care too much.

That’s pretty much it already. The reason why I shared all this is that it is something major I’ve been wanting to do and now finally managed to do and that I hope to give you some inspiration, ideas or simply influence your decisions for hosting providers and plugins. Let me know if you wanna get more details on a specific topic!

Leave a Reply

Your email address will not be published. Required fields are marked *