Want to create a WordPress site without breaking the bank? This guide will show you how to launch and maintain a static WordPress site for just $10 per year using free tools and affordable hosting.
Set Up a Local WordPress Environment
The first step is to create a local WordPress installation on your computer:
-
Download and install Local by Flywheel, a free local WordPress development tool.
-
Open Local and click the “+” button to add a new site.
-
Choose “Create a new site” and give your site a name.
-
Select the “Preferred” setup option for a standard WordPress configuration.
-
Create admin credentials for your local WordPress install.
-
Once setup is complete, click “WP Admin” to access your local WordPress dashboard.
With your local environment ready, you can now build out your WordPress site as normal - install themes, add content, customize settings, etc. The key difference is this site exists only on your computer for now.
Convert WordPress to Static HTML
To create a static version of your WordPress site:
-
Install the Simply Static plugin on your local WordPress install.
-
Go to Simply Static > Settings in your WordPress admin.
-
Under “General”, set URL replacement to “Absolute URLs” and enter your final domain name.
-
In the “Deploy” section, choose “Local Directory” as the deployment method.
-
Specify a local folder to save the static files (e.g. ~/Desktop/static-site).
-
Click “Generate” to create static HTML files of your WordPress site.
This process converts your dynamic WordPress install into plain HTML/CSS/JS files that can be hosted anywhere.
Set Up GitHub Repository
Next, we’ll use GitHub to store and version control the static site files:
-
Create a free GitHub account if you don’t have one.
-
Create a new private repository for your site.
-
Install Git on your computer if not already installed.
-
Open Terminal/Command Prompt and navigate to your static site folder.
-
Initialize a Git repository:
git init
- Add and commit your static files:
git add .
git commit -m "Initial commit"
- Connect your local repo to GitHub:
git remote add origin https://github.com/USERNAME/REPO.git
git branch -M main
git push -u origin main
Replace USERNAME and REPO with your GitHub details.
Deploy to Cloudflare Pages
Now we’ll use Cloudflare Pages to host the static site:
-
Create a free Cloudflare account.
-
Go to Workers & Pages > Pages and click “Connect to Git”.
-
Select your GitHub repository and branch.
-
Configure build settings (usually not needed for static sites).
-
Click “Deploy site”.
-
Once deployed, add your custom domain in the Cloudflare Pages settings.
Cloudflare will now automatically deploy your site whenever you push changes to GitHub.
Create an Update Workflow
To streamline future updates:
-
Make changes to your local WordPress site.
-
Use Simply Static to generate new static files.
-
Commit and push changes to GitHub:
git add .
git commit -m "Update site content"
git push
- Cloudflare Pages will automatically deploy the updates.
Consider creating a shell script to automate steps 2-4 for even faster updates.
By leveraging free tools like Local, Simply Static, GitHub, and Cloudflare Pages, you can run a WordPress-powered site for just the cost of a domain name. While this approach has some limitations compared to traditional WordPress hosting, it offers excellent performance, security, and cost savings for many types of websites.