How I host this site for free simply statically

I used to pay Jeff Bezos for this website. Now I host it for free. That’s a good thing.

I can do that because this website is Static.

A TV with television static flickering on it.
No, not that kind of static.

This kind of static means that when you visit a page on andyhowes.co, you’re being given the same HTML file every time.

That doesn’t mean that this website is boring (or if it is – that’s unrelated). It just means that there is only one HTML file per page, and when anyone wants it, all I need to do is give it to them.

This is opposed to Dynamic websites, which have databases behind the scenes helping to generate content for users.

Static websites are simpler, smaller and more secure. They’re so small that Cloudflare lets you host static websites for free on their network.

So why doesn’t everyone do that? What is a static website? How can I get on this free gravy train? Please let me show you:

Why doesn’t every website go static?

Static websites are cool, but it isn’t how most websites work. Most sites aren’t static because they need to provide personalised content or update frequently, which is challenging with static files.

Because of these problems, most websites use a content management system, like WordPress or Squarespace, which helps creators make the site. When someone visits the site, the server checks internal databases to find content and display it to users.

And honestly, these tools work great. They are quick to work on, reliable and pretty. WordPress is even free!

But, hosting these services is not free or easy. Plus all that computing in the background can make them slow and vulnerable. If all you need is to communicate information, like in this blog, you don’t need any of that fancy background stuff when someone visits, you just need to give them a pretty looking HTML file.

So is there any way that you could have the best of both worlds? Use WordPress to design and update your website, then convert it to a static site to hand it over to the rest of the internet?

There is! That’s how this site works!

Sound good? Jump straight to the how to guide here.

Still not sure if it’s for you? Fair enough – it might not be. Read on.

Should I go Static?

Static websites have a lot going for them. They’re fast, which makes users happy and gives search engines a reason to rank you higher. They are also less prone to attacks. You can’t go to my WP-Admin and guess my password on this site because it just doesn’t exist.

And the best part? Hosting is cheap, or even free, as you’ve seen.

Static sites are perfect for documentation, blogs and portfolio sites. They’re also great for instructional websites—basically, anything where content doesn’t change constantly.

But, static sites aren’t for everyone. Some websites need to be dynamic—like online shops or social media platforms.

There are other limitations too, like a lack of search and or comments. Most static websites don’t come with search functionality out of the box and you can’t leave a comment if there’s no database behind the scenes to save your comment in.

For me, I disabled WordPress comments before I even went static so I didn’t have to deal with inevitable spam. If you do have to something to say, you can contact me here instead.

For searching, my workaround is some basic JavaScript that searches Google in a new tab. If you want a proper on-site search feature, Simply Static Pro has you covered with a pretty cool search integration and some other handy features.

There are other minor drawbacks, like manually updating the site whenever you make changes. It’s not difficult but it’s an extra step compared to a fully dynamic setup.

In short, if you’re after speed, security, and lower costs—and you don’t need constant updates or live feeds—static might be just what you’re looking for.

How to create a static WordPress site

To do this you need a few things.

Firstly, you need a computer. This is just to create, edit and update the website. Whenever you publish a change to the website you can put it away again.

On that computer, you’ll need Local WP installed. This lets you create a WordPress website on your device for free. On that WordPress installation, you’ll need the Simply Static plugin, which is – you guessed it – free. This app does the heavy lifting of transforming your WordPress site into a Static site.

Now you have some choices. If you want easy static web hosting you can use Simply Static’s Pro features to save some time. If you want free (and still pretty easy) static web hosting, you can use GitHub to store the HTML files that you generate, and then Cloudflare Pages to host them. I’m stingy, so that’s what I do.

Finally you need a domain. This is hard (and probably not wise) to get for free, but it can be done.

Here’s a summary:

What you need What it does Annual cost
A computer You’ll need this to create and edit the website. Don’t worry – we’re not using it as a server. I’m going to assume you’ve already got one
Local WP This lets you create a local WordPress site on your own computer $0
Simply Static This turns that local site into a Static website $0
GitHub This is where you’ll keep those static HTML files when you generate them $0
Cloudflare Pages This is what will give those static files to the rest of the world $0
A domain This is your URL. It’s normally not free but there’s not much you can do about that ~$10

Getting started

Follow these steps to set up your static website using WordPress, Simply Static, GitHub, and Cloudflare Pages:

1. Install Local WP and create your site

  1. Download and install Local WP on your computer, open it up and create a new site.
  2. Give your site a local domain name. This should be different from the final domain you’ll use on the internet.
  3. Follow the prompts to set up your local WordPress installation, and design your website using WordPress themes and plugins.

Tip: If you already have a WordPress site, you can use other WordPress plugins, like WP Migrate, to create a local copy.

2. Install and configure Simply Static

  1. In your local WordPress site admin area, go to Plugins > Add New.
  2. Search for “Simply Static” and install the plugin.
  3. In Simply Static > General > Replacing URLs choose Relative path, so that when you publish to another domain your site will work.
  4. Check Generate a 404 page in Simply Static settings to create a custom error page for your site if someone goes to a page that doesn’t exist.

Tip: You might want to check out some of the other settings and features of Simply Static to work out what’s right for you.

3. Set up a GitHub repository

  1. Create a GitHub account if you don’t have one, and then create a new private repository.
  2. Clone that repository to your device. If you’re not sure how to do this, I’d recommend installing GitHub Desktop and following these instructions to get a clone of your repo onto your device.
  3. Optionally, set up a development branch if you want to have a test and a live site.

4. Generate your static site

  1. Go to Simply Static > Deploy, and choose Local Directory as your Deployment Method. Under path, add the path to your folder GitHub Repo.
  2. Now it’s time to Generate your Static Site. Go to Simply Static > Generate. Click “Generate Static Files” and wait for the process to complete. This is what will create a static version of your website.

Pro tip: it’s worth backing up your Local WP site after you make changes and generate your site. You can do that by exporting your site on Local WP and saving the ZIP file somewhere safe like a cloud storage location.

5. Final preparation

  1. Cloudflare looks for a 404.html file in the root directory to serve as the custom 404 error page, so if you’re using Cloudflare Pages, find the 404 folder of your repo, copy and rename the index.html file to 404.html and move it to the root directory of the repo.
  2. Once you’ve done this use Git or GitHub Desktop to commit your changes and push them to your GitHub repository.

6. Configure Cloudflare Pages

  1. Sign up for a free Cloudflare account.
  2. Once in, follow Cloudflare’s instructions on how to set up a static website.
  3. Select your GitHub repository and follow the setup wizard to Deploy your site.
  4. Once deployed, go to Pages > Your Project > Custom Domains to add your domain.

Congratulations! Your static website is now live and hosted for free on Cloudflare Pages.

How do I update it?

Updating your static website is straightforward. Follow these steps whenever you want to make changes:

1. Boot up your Local WP site and make the changes

  1. Open Local WP and start your website’s local server.
  2. Access your WordPress admin area and make any changes you want.

2. Generate new static files

  1. Go to Simply Static > Generate in your WordPress dashboard.
  2. Click “Generate Static Files” and wait for the process to complete. This will update and overwrite all pages in your Github repo with the latest changes on your site.
  3. If you’re updating the 404.html page, make sure you move it to the root directory.

3. Push changes and watch your site update

  1. Open GitHub Desktop and push your changes to GitHub. this will trigger a rebuild from Cloudflare and your site will update.
  2. I’ve set up my integration to have a Dev and a Main branch, so I push changes to the Dev branch. Cloudflare then builds a Dev version with my changes so I can review. Once happy, I merge to the Main branch and my changes are released out into the world.

Pro Tip: I recommend using Git branches this way too – it lets you test changes before they end up on your live site.

4. Save a backup of your Local WP site

  1. In Local WP, find your site and click Export. Save this ZIP file somewhere safe and preferably off device. This will ensure that if your computer dies, your non-static website doesn’t die with it.

By following this workflow, you can enjoy the benefits of a dynamic WordPress environment for content creation while serving a lightning-fast static site to your visitors, all without ongoing hosting costs.