Performance and monitoring
What the object cache is and how to set it up in WordPress
WordPress includes an in-memory object cache that avoids repeating operations, such as queries already answered, within the same request. By default it is not persistent: its content disappears when each PHP run ends and is not kept between visits.
This does not mean WordPress stores its object cache in wp_options. Transients can be saved in that table when there is no persistent cache, but they are a different API.
Persistent object cache
WordPress lets you replace its implementation with the special file wp-content/object-cache.php. Compatible plugins use this mechanism to keep objects between requests in a service such as Redis or Memcached.
A persistent cache can cut repeated queries in shops, communities, course platforms or very busy admin areas. An informational site already covered by a page cache may not see a noticeable improvement.
Only the operations that WordPress, the theme or the plugins store through the object or transients API will benefit. Redis does not fix, on its own, a slow query that is never cached.
Recommended setup with Redis
All our plans let you enable a Redis instance from the Package manager in the client area. The connection uses a Unix socket that belongs to the account.
You can integrate it from LiteSpeed Cache, choosing Redis in its object cache section, or with the Redis Object Cache plugin. You will find the steps, connection values and precautions for hosting several sites in the guide to Redis as an object cache.
Choose a single object cache integration: LiteSpeed Cache and Redis Object Cache must not compete for the same object-cache.php file. You can keep LiteSpeed's page cache if another plugin handles objects.
After enabling it, check the connection and compare times and resource use on the same pages: a product page, a search and an action in the admin area. Repeat the tests once the cache is warm and check that content changes show up correctly.
If it brings no improvement or keeps being emptied for lack of space, first disable the integration from the plugin. Check that the site still works and turn Redis off only when no application in that account needs it. Do not delete the integration file by hand without following the plugin's procedure.
You may also find useful
- AccelerateWP: features, availability and configuration Details the free and premium AccelerateWP features for WordPress, including caching, file optimisati...
- Set up LiteSpeed Cache on WordPress and WooCommerce Install and activate LiteSpeed Cache on WordPress or WooCommerce, adjust resource optimisation, purg...
- Setting up the QUIC.cloud CDN on WordPress with LiteSpeed Cache Connect WordPress and LiteSpeed Cache to QUIC.cloud, set up the domain via CNAME or DNS and review c...
- Is Memcached available? Clarifies the difference between the Memcached PHP extension and the cache server, and explains that...
Something wrong or out of date? Tell us and we will review it.