Here is how I host my website for free. There were four main steps I took: get a custom domain, set up WordPress locally, push the static site to GitHub, and use Cloudflare Pages to deploy it by connecting to the repo.
The first step I took was getting a custom domain. I registered a “.com.np” domain under my name from Mercantile. This was optional, but I wanted it for personal branding. At this stage, I could have just used GitHub Pages to host a static site — I did this before — but I wanted more flexibility and convenience with WordPress.
To set up WordPress locally, I installed XAMPP. XAMPP is bundled with Apache and MySQL. Apache acts as the web server, while MySQL manages the database. I installed WordPress in the htdocs folder inside the XAMPP installation directory. After starting both Apache and MySQL in XAMPP, I was able to create a local WordPress site, accessible at http://localhost/ in the browser.
I used the Blocksy theme for WordPress since it offers many features on the free plan. I also installed the Spectra plugin for additional blocks, for example the modula gallery block for building a photo gallery the way I wanted. Other plugins include All-in-One WP Migration, Simply Static, and All in One SEO. For typography, I opted for the Courier New font because I like the typewriter-style design.
After setting up the site, I used Simply Static to generate a static version of WordPress and pushed it to my GitHub repo. Then I set up Cloudflare Pages and connected it to the repo. Any changes I push to GitHub are automatically deployed to Cloudflare Pages, making deployment and version control simple.
