Local environment

  1. Check the current version of Hugo by typing hugo version in the terminal (command prompt).

  2. Download the latest version of Hugo from its releases page on GitHub. Make sure to download the hugo_extended version. Choose the correct ZIP file according to your OS configuration. For example, my computer is using Windows 64 bit, so I’ll choose the hugo_extended_0.99.1_windows-64bit.zip file, where 0.99.1 will be changed according to the latest version available.

  3. Go to the Hugo bin folder on your local system. It might be in C:\Hugo\bin. It can also be in a different path, depending on your initial setup of the Hugo environment (learn more on how to install the Hugo environment).

  4. Replace the three files in this bin folder (hugo.exe, LICENCE, and readme.md) with the new files from the ZIP file you downloaded in step 2.

  5. Make sure that the version has been updated by typing hugo version again in the terminal (compare it to the old version found in step 1).

Cloudflare Pages

If you use Cloudflare Pages to deploy your Hugo site, you may need to update one more thing.

In step 5 of the Cloudflare Pages project creation guide, we use the “Environment variables” option to set the HUGO_VERSION variable.

We will need to update this variable value, so that in its next build, Cloudflare will generate the site using the new version that we now have in our local environment:

  1. Log in to your Cloudflare account.
  2. On the Cloudflare homepage, click the “Pages” tab in the left menu.
  3. Under your site’s project, click on “Settings” in the top menu.
  4. Click the “Environment variables” tab in the left navigation.
  5. Change the value of the HUGO_VERSION variable to the new version you installed in your local environment (e.g. 0.99.1) and click the Save button. Change it in both the Production environment and the Preview environment.

References