About a year ago a friend made fun of me when I said I was using Wordpress, apparently Wordpress was not that hot anymore and he started talking about Hugo.
Hugo is a static site generator where you write your posts in markdown and a generator written in Go generates your site as static content. There are some benefits here:
- You don’t rely on a database and an internet connection when writing a draft post
- You can host the site in an S3 bucket which means you don’t have to have a Linux server.
- Having no server means that you can’t be hacked
I’m not going to go into too much detail here but these are the steps I performed to migrate:
- Export all your Wordpress data to an XML file
- Convert your posts using exitwp-for-hugo
- Download the pictures from Wordpress, store them in your static directory and change the links.
- Go through your posts, there are probably some weird things left behind.
- Generate your static site!
That concludes the Hugo part of things, depending on how you plan to host it there are different paths but I’m hosting in Amazon. There are a lot of posts about doing this so I’m not going into details but here’s the high level: 1. Create an S3 bucket (domainname.com is a good name) 2. Set it up for web site hosting 3. Migrate your DNS records to Route53, this is so that you can point the root of the domain to your bucket. Route53 is not free but it’s 50 cents per months so cheaper than a LAMP server. 4. Upload your website to your S3 bucket, just take everything in the public folder 5. Setup CloudFront to host your domain and take care of TLS certificate generation.
Here’s a longer blog post about the steps above: Hosting a HTTPS static website on Amazon S3 w/ CloudFront and Route 53
This is my first Hugo post, I wrote it in Visual Studio Code with the Hugofy plugin.
PS I haven’t added search and comments yet so feel free to harass me on Twitter DS