4 ms·
Ignore all the comments telling you to switch to static content generation, that's generally a large time endeavour and for a blog that is getting 50k uniques a
by nodesocket 8y ago
Ignore all the comments telling you to switch to static content generation, that's generally a large time endeavour and for a blog that is getting 50k uniques a month should be pretty easy to serve all requests with a little CloudFlare tuning.
First, let CloudFlare do 99% of the work. Don't worry about optimizing the linux box, PHP, MySQL, PHP Opcode Cache, WP-Cache at first.
First, let's check that CloudFlare is caching and serving all static assets such as js, css, images, .xml, .ico. I don't see a cache-control header being returned on js, css, images, etc. Make sure this is setup in CloudFlare with Caching Level => Standard and Browser Cache Control => 1 month. Also, consider enabling Auto Minify => Javascript and CSS. Finally enable Brotli and make sure HTTP/2 is enabled under network.
Now, here is where you can really make things fly. It is possible to have CloudFlare cache the result of generated html pages, so requests don't even hit your shared hosting provider. This is done with Page Rules. The trick is going to be crafting a rule that you can match posts and posts only. With my site, I leave .html extension on my files, so my rule is simply:
https://imgur.com/a/4iNpB4V https://imgur.com/a/4iNpB4V
Your challenge will be creating a matching rule while excluding admin backend pages. Also, most certainly you probably going to want a much lower cache time than 8 hours. My site content does not change often. Perhaps something like 30 or 60 minutes to start.
Good luck, let me know any questions, my contact info is in my profile.