I am looking to improve speeds of our Wordpress website.
While looking for it, I came across Bytecode & Object cache.
I am unsure if Bytecode cache already comes implemented with the PHP version in use (though it looks like it does - PHP 8.1 is currently in use).
I am looking to implment Bytecode & Object cache for the wordpress installation running on our server. I could not find any leads to it.
Is something similar already implemented with Apis installation?
In regards with Object cache - I read that, we can enable Apache to use memory instead of disk. But I am unsure if that enables Object cach’ing.
Looking for some help in this direction. Any help would be great.
This is OPcache. It’s automatically installed, activated, and optimized for your platform environment. No further action is necessary except if you’d like to enable JIT but even I’ve seen irregularities with it in the ApisCP codebase.
Object Cache, it’s useful if your database is remote. Otherwise it makes no difference. Benchmark.md walks you through optimizing WordPress.
The most pragmatic decisions will be:
- Use a caching plugin, like W3TC, that renders output as a static file. This bypasses PHP entirely, which will always orders of magnitude slower than reading direct from disk.
- Put your plugins on a diet. Remove any that are not in use or at least disable. Any time a cache request is missed and WordPress is loaded directly, every single plugin is initialized. Some people are better marketers than programmers.
- Keep a lean .htaccess. Every request - including media and CSS - will parse this file. CPU cycles are never free.
Benchmark.md walks you through these key concepts.
Thank you for replying back Matt!
Rendering output as as static file would not be an option for a e-Commerce site I believe. We have a lot of products & banners on the home page. Or am I wrong about that?
Depends. Product pages can be static. Storefront landing page can be as well. Shopping carts cannot. Rendering a shopping cart as a component of a page layout could be if the other modular components don’t contain private information. Likewise a checkout page almost certainly wouldn’t unless everything is API-driven.
This really comes down to how an application is designed, monolithic vs modular.
For WooCommerce, it’s monolithic design. You’ll be able to cache some things, such as product pages but cannot cache once items are in a shopper’s cart. Here’s a guide on configuring caching with WooCommerce.