Switching from Hosted to Self-hosted WordPress


Today was moving day.

I started blogging in 2012 at the very beginning of my career as a developer (though it only lasted about 8 months the first time). It was fun and a good way to keep track of what I was working on. I had no experience working with server admin, so I opted for hosted WordPress at wordpress.com.

Almost 11 years later, I have worked extensively on many pieces of the stack. I’m comfortable standing up a server and doing admin tasks that need done. Also, things are just easier than they were in 2012. I’ll explain more later, but I ended up going with Digital Ocean and their 1-click WordPress app.

Why WordPress in 2023?

A lot of good blogging options exist now that didn’t in 2012. I chose WordPress again in 2023 for a few reasons, but I think the main one is ease. I often do side projects to learn new languages and frameworks, but this wasn’t going to be one of those times. WordPress just has that monumental inertia where I know it’s supported and I know I can find answers to my questions that may arise. I think the big reason people skip WordPress is the perception it is slow, but it seems snappy enough to me especially at the level of usage a personal blog would get.

Other reasons:

  • My old posts are in WordPress. WordPress has export/import functionality that made it easy to migrate to a version I am hosting.
  • Digital Ocean had a 1-click install with the most-recent versions of PHP, Apache, and WordPress.
  • I wanted a WYSIWYG post editor. I have used static site generators like Hugo, but WordPress is just easier than creating a static blog. I type on the web and hit publish.

Hosting Options

After settling on WordPress, I looked at options for hosting. I settled on Digital Ocean to have more control over the install and to avoid some of the things I saw with the hosted options like making everything an add-on cost. Going with Digital Ocean also gives me a full server that I could use for other self-hosted software if I need in the future.

ProviderMonthly PriceProsCons
Digital Ocean$6– Full server
– Cost similar to hosted providers
– 1-click App install
– Server maintenance, security, certs, etc. is on me
– Set up was more involved than with a managed provider
AWS Lightsail$3.50– Full server
– Low cost
– 1-click App install, sort of
– 1-click install is not as easy as Digital Ocean
– AWS monopoly
EasyWP$6.88– Dead simple– Base price doesn’t include SSL
– Advanced features (e.g., SSL) cost more that are included in the other options
WordPress.com$9– Dead simple– Custom domain is included in the price, but I don’t know how much they charge

So I went with Digital Ocean for price + ease + flexibility.

How I Set up the Site

  1. I bought the domain crashinginthecloud.com
  2. Clicked the “Create WordPress Droplet” button on https://marketplace.digitalocean.com/apps/wordpress
  3. ssh’d in as root and ran through the steps automatically presented there. That sets up admin access on WordPress as well as going through the actions for setting up the SSL cert.
  4. Did various server hardening things
  5. Set up DNS in Cloudflare to point crashinginthecloud.com to my new IP
  6. Modified some other settings in Cloudflare:
    • Turned on redirecting HTTP traffic to HTTPS: https://developers.cloudflare.com/ssl/edge-certificates/encrypt-visitor-traffic
    • Set SSL/TLS encryption mode to “Full (strict)”. Because we set up certbot, we have a signed cert on the server and traffic from Cloudflare to the server can use HTTPS.
  7. On my old, managed WordPress install, used the export function to get a download of all my existing posts, categories, tags, images, etc.
    • https://wordpress.com/support/export/
  8. On my new WordPress install, used the import function to bring all the old content in. For all the bad press WordPress gets, I was expecting problems. This worked flawlessly though. I’m sure it helped that my old site had very little content and no complicated customizations.
  9. Picked a new theme.

All that, including comparing different options, took about 4 hours. Now I’m ready to write.

,

Leave a Reply

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