Apps ·
Speed up WordPress with the Redis object cache
One switch adds a Redis object cache to your WordPress app. What it does, when it helps, how to confirm it is connected, and what to watch.
WordPress asks its database for the same things over and over: options, menus, the list of plugins, the posts on the front page. An object cache keeps those answers in memory so the next request skips the database. On our WordPress apps that is one switch; this guide explains what it does, when it helps and how to check it is working.
What you need
- A WordPress app running with us (see Start a WordPress site).
- Admin access to that site's
wp-admin.
Switch it on
- Open the WordPress app under Apps in the panel.
- In the Settings card, under WordPress, switch Redis object cache on.
- The panel says it has saved the setting and that the app restarts briefly. The restart takes about half a minute.
Behind the switch the panel adds a small Redis server to your app, installs the Redis Object Cache plugin, points it at that Redis and enables the drop-in that WordPress uses for its object cache. Nothing is exposed to the internet: Redis only listens inside your app.
Check that it works
In wp-admin, open Settings, then Redis. The plugin's page shows Status: Connected and the drop-in as valid. The Flush Cache button there empties the cache if a plugin ever shows stale data.
When it helps, and when it does not
It helps most where WordPress has to work per request:
- logged-in visitors, which page caches skip anyway: editors, members, customers in a shop;
- WooCommerce carts, checkouts and account pages;
- sites with many plugins, each adding its own options and queries;
- high traffic where the database becomes the bottleneck.
It does nothing for anonymous visitors on pages already served from a full-page cache, and it does not speed up slow themes or external requests. If your site is a brochure site with a page cache, you may see no difference and can leave it off.
Good to know
- The cache lives in memory in your app. A restart empties it; WordPress fills it again within a few requests. Nothing is lost.
- It counts against your app's memory. On the smallest tier keep an eye on the CPU & memory card after switching it on; a site that was already near its limit may need more memory.
- Switching it off removes the plugin and the drop-in again and restarts the app. Your content is untouched either way; only cached copies are involved.
- Do not install a second object cache plugin alongside it. WordPress can only have one drop-in, and they fight over it.