{"id":321,"date":"2023-12-31T23:59:00","date_gmt":"2024-01-01T04:59:00","guid":{"rendered":"https:\/\/gmays.local\/?p=321"},"modified":"2024-01-17T14:15:23","modified_gmt":"2024-01-17T19:15:23","slug":"how-to-host-wordpress-sites-free","status":"publish","type":"post","link":"https:\/\/gmays.local\/how-to-host-wordpress-sites-free\/","title":{"rendered":"How to host WordPress sites free"},"content":{"rendered":"\n
I used WordPress for over 15 years \u2014 it’s a solid tool if you need everything it offers. But what if you want to switch to a lower-cost, lower-maintenance, more secure setup?\u00a0Here’s how to do it.<\/strong><\/p>\n\n\n\n Until recently, I built WordPress-related software, so I maintained a dozen WordPress sites to ensure I used it regularly (yay, dogfooding).<\/p>\n\n\n\n In fact, there was a period when I committed to using the products my teams built daily. I reached 900+ days on my longest streak. I finally lost the streak on a trip to China.<\/p>\n\n\n\n During this period, I even formed an LLC just to be able to buy an EV SSL certificate to test all of our company’s products with my product line. It was time-consuming, but we made huge quality improvements during this time, which drove the business more than double every year for the next few years.<\/p>\n\n\n\n But, after changing jobs, I no longer needed to stay so close to WordPress and wanted to simplify my website portfolio. Here’s how I did it.<\/p>\n\n\n\n Here’s how to host WordPress sites for free (and minimize domain name costs). Not all these steps are required, but I invested more time upfront to optimize for long-term simplicity and cost savings.<\/p>\n\n\n\n Now, whenever you need to update your site, do it in your local WordPress install and upload the new static files that get generated. Local is pretty good and makes local environments easy, but sometimes it won’t work. The two most common reasons I’ve seen:<\/p>\n\n\n\n As mentioned above, the easiest way to deploy to Cloudflare Pages is with Direct Upload<\/a>. But if your site exceeds the Direct Upload limits of 25MB as a zip file or 1,000 files as a folder, you’ll have to use another method.<\/p>\n\n\n\n The next easiest option is using GitHub<\/a>, but that can also be intimidating if you’re new to GitHub, so here’s an easier way to do it:<\/p>\n\n\n\n Now, whenever you make changes, generate new static files, update your local repository, and commit\/push the changes, it’ll automatically deploy the new build.<\/p>\n\n\n\n Yep, there are a couple ways to do it. The simple option is to add Page Rules at the website level since 3 page rules are included free (the paid plan includes more). The other option is to use Pages redirects described here<\/a>.<\/p>\n\n\n\n Since Simply Static regenerate all files in the directory, it can be annoying if you need to keep re-adding files like ads.txt.The motivation<\/h2>\n\n\n\n
How to host WordPress sites free<\/h2>\n\n\n\n
\n
That\u2019s it!<\/h2>\n\n\n\n
You can also automate this pipeline using GitHub, which I shared more details on below (Simply Static also has a paid automation option).
I rarely update the site (a few times a year max), so I have my static files save destination set to my local repo for easy deploys.<\/p>\n\n\n\nTroubleshooting & extra details<\/h2>\n\n\n\n
Local environment is not working<\/h3>\n\n\n\n
\n
Site exceeds Cloudflare Upload limits, but you’re not technical or uncomfortable with CLI<\/h3>\n\n\n\n
\n
<\/figure>\n\n\n\n
Can Cloudflare Pages handle redirects?<\/h3>\n\n\n\n
How do I handle files in the root like ads.txt?<\/h2>\n\n\n\n
There are multiple ways to handle this, but an easy way is to create a Page Rule that redirects example.com\/ads.txt to your ads.txt file hosted somewhere. I put mine on AWS S3 since I already had it available.
More on redirects described above.<\/p>\n\n\n\nCan you also create free email addresses & route emails?<\/h3>\n\n\n\n