4 ms·
“Host” WordPress on Cloudflare for Free
- rado 5y agoGood to see simplification of static WP hosting.
- PinkPigeon 5y agoSo 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.
- dgb23 5y agoAnd a (non-ephemeral) file storage for user uploaded assets.
- cunthorpe 5y agoI'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.
- csomar 5y agoTitle 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.
- cunthorpe 5y agoI 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.
- ddnb 5y agoThe 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?
- ushakov 5y agohttps://www.netlify.com/products/forms/ https://www.netlify.com/products/forms/
- PinkPigeon 5y agoYeah 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 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.
- deleted 5y ago[deleted]
- cunthorpe 5y agoThis 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.
- dgb23 5y agoA 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.
- toastal 5y agoWhile 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/branch/master/readme/en.md https://git.honeypot.im/crimeflare/stop-cloudflare/src/branc...
- nikolay 5y agoWordPress 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!