Upload Site to Cloudflare

To upload our site to Cloudflare we need a package called wrangler. It is recommended to install this package local in the project.

cd ~/www/myblog/
npm install wrangler --save-dev

Check if correct installed:

npx wrangler --version

If version needs an update:

npm i -D wrangler@latest

Build the site:

cd ~/www/myblog/
hugo

And upload the site to Cloudflare pages:

npx wrangler login
npx wrangler pages deploy public/

The blog is now live at your domain!

Tutorial series
All posts in Tutorial
  1. Introduction
  2. Buying a Domain
  3. Setting up a Cloudflare account
  4. Custom email free
  5. Upload site to Cloudflare