Hacker News new | past | comments | ask | show | jobs | submit login
[flagged] “Host” WordPress on Cloudflare for Free (blogabout.dev)
52 points by redact207 on June 24, 2021 | hide | past | favorite | 15 comments



Title is click-bait. This is about hosting a "static" website on Cloudflare page (similar to Github pages) and not hosting WordPress which requires PHP, storage and a database.

PS: You could actually do better: Use Github pages and Cloudflare pages and do DNS load balancing between the two.


I think this comment is correct. This post amounts to "use the Simply Static plugin and upload the HTML files somewhere," which is nothing new and can be done without having to setup a dummy repository to appease CloudFlare.

From the title I thought they managed to run WordPress in CF Workers or something, but no, you still need a machine to run the PHP and database, whether local or remote.


The major thing holding static "wordpress" or any rather simple site back is definitely forms. I'm wondering what the best solution to this would be? My guess is forms hosted elsewhere loaded in via JS? Anyone have recommendations on what service to use for this?


Yeah POST requests with any sort of advanced functionality will always require some kind of server.

I built a thing that makes static sites, including form handling. BUT, the form handling, inevitably, requires a POST request back to a form-forwarding server that then sends you the enquiry via email (https://pinkpigeon.co.uk). Netlify include form handling for static sites, but it's so pricey that that was one of the main motivators for me to build my own solution.

I am not sure what the best implementation for this would be. Some people may go down the AWS Lambda route or something similar, but that's still just a (albeit highly distributed) server forwarding the request for you.


This is such a common request that several companies doing exactly this were born and closed shop over the years.

I wrote a little script and placed it on Lambda and it still works years later. There are plenty of pre-packaged examples and templates to do the same.

A simple "static forms" search will show you several hosted and self-hosted options.


Cloudflare Workers have access to the key-value data store [1].

I believe this can be used to process forms (temporary).

The free tier is enough for a small blog.

[1] https://developers.cloudflare.com/workers/learning/how-kv-wo...


A form service would have to (incomplete list):

* read from or change db records, possibly not self contained (directly accessing WP tables)

* be generated from a schema that allows for both frontend and backend validation

* said schema might be generated from or amended by db records

* authenticate with and talk to arbitrary external or internal services

* write to and read from the/a file system

* have an authentication and authorization scheme, possibly maintained via sessions

* send formatted email

* ...

So depending on where the service sets its boundary, it becomes either useless or too complex, when the alternative is to just write a module in PHP.



> My guess is forms hosted elsewhere loaded in via JS? Anyone have recommendations on what service to use for this?

I've been using this for years: https://formspree.io/

It's been simple and reliable for me and you can use it as just a regular <form> without JS.


WordPress is the biggest pile of spaghetti that's literally everywhere. In some modest setup, it makes 500+ calls to MySQL and thus it can never be ever fast or scale well. Another challenge is that it will always exceed whatever amount of memory you allocate for it. Storing PHP arrays in database columns is just sickening!


While I do like the accessibility of ‘free’ (as in beer) for people that otherwise couldn’t afford to have a ‘voice’ with their blog, I believe it’s unwise to suggest/endorse more people use a centralizing platform like Cloudflare which is breaking the internet for other people who want to be ‘free’ (as in freedom) to listen in a secure way. Cloudflare is actively hostile towards Tor and VPNs (also hosting the hardest CAPTCHA system out there for real humans). We’ve recently in the last month seen the ramifications of these CDNs middling between too many sites with Fastly and Bunny going down.

For more reasons to not use Cloudflare: https://git.honeypot.im/crimeflare/stop-cloudflare/src/branc...


Good to see simplification of static WP hosting.


So far as I can tell, Wordpress requires PHP and a DB still, you're just storing a static snapshot of the WP site on Cloudflare pages here. I think.


And a (non-ephemeral) file storage for user uploaded assets.


I've been looking for this for years. I have a little blog for family that I keep around on shared hosting but would really like to find a way to move the active part to serverless and just update the static version once a year.

All of this without paying $25/month for managed WordPress.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: