{"id":167,"date":"2019-11-21T19:28:00","date_gmt":"2019-11-22T00:28:00","guid":{"rendered":"http:\/\/127.0.0.1:8080\/?p=167"},"modified":"2024-01-13T14:00:19","modified_gmt":"2024-01-13T19:00:19","slug":"cache-and-speed-for-wordpress","status":"publish","type":"post","link":"http:\/\/10.42.0.68:8080\/blog\/cache-and-speed-for-wordpress","title":{"rendered":"Cache and speed for WordPress"},"content":{"rendered":"\n

Sometimes, it’s quicker to use WordPress instead of another system to do a blog.
Now, it’s time to have a cache and gain good improvement in rendering.<\/p>\n\n\n\n\n\n\n\n

1. The right web server<\/h2>\n\n\n\n

I use Nginx<\/a> with PHP-FPM<\/a> to be the secure base: 2019, no more Apache2<\/p>\n\n\n\n

It’s also possible to implement cache at the Nginx level but I don’t use it. I prefer improvement related to metrics.<\/p>\n\n\n\n

2. JS\/CSS\/HTML optimizer (optional)<\/h2>\n\n\n\n

I tested Autoptimize<\/a> and finally, it’s interesting when you use Elementor<\/a>.
This blog doesn’t use Autoptimize because during the test: 0kB\u2026 impossible to optimize more.<\/p>\n\n\n\n

3. In-memory caching<\/h2>\n\n\n\n

It’s time to use Redis<\/a> with Redis Cache<\/a>.<\/p>\n\n\n\n

WordPress will refresh the cache inside Redis after posting, and commenting\u2026 and all readers will go to Redis. It’s a good improvement and a new way to not use Varnish or Nginx cache immediately.<\/p>\n\n\n\n

4. CDN<\/h2>\n\n\n\n

It’s the last step with Cloudflare<\/a>.
The free version works great for personal sites\/blogs.<\/p>\n\n\n\n

Other improvements<\/h2>\n\n\n\n

What are the next possible steps to improve performance:<\/p>\n\n\n\n