Repository navigation
Troubleshooting
This page covers the problems people actually meet, what causes each, and how to fix it. Start with the response headers: they nearly always say what happened.
curl -sI https://example.com/ | grep -i x-aceRun it signed out, with no cookies, against a plain URL with no query string.
For the state of the whole cache in one go:
wp aceredis statusTools > Site Health runs the same checks from wp-admin: the Redis connection, the drop-ins and WP_CACHE, OPcache, and any invalidation still waiting after an outage.
Work down this list. Each step rules out one cause.
Settings > Ace Redis Cache > Connection > Enable Cache must be ticked, and Page Cache on the Caching tab. A fresh install has caching off.
The page cache needs it. On older versions pages render live and there is no X-AceRedisCache header at all.
Run the connection test on the Diagnostics tab. If it fails, see Cannot connect to Redis.
Signed-in visitors get live pages by default. So does anyone with a WooCommerce basket. Test in a private window or with curl.
From 0.10.4 the header says why a page was not cached:
X-AceRedisCache: BYPASS; reason=cookie
BYPASS means the cache was not used for this request. MISS with a reason means the page was rendered but not stored.
| Reason | What to do |
|---|---|
first_view |
Nothing. The post was saved a moment ago, so ask again. Before 0.10.6, with Transient Cache off, a page was stored on its second view and the third request was the first HIT. |
logged_in, cookie
|
You are not testing as a guest. Clear cookies or use curl. |
query_string |
Remove the query string, or ?aceredis_nocache=1
|
excluded_path |
The path is excluded: a shop page, a sitemap, or one added by the aceredis_cache_excluded_urls filter |
private_response |
Something sends a Cache-Control of private, no-store or no-cache. Find what sets it. |
donotcachepage |
A plugin or theme defines DONOTCACHEPAGE for this page. That is a request not to cache it. |
preview |
You are viewing a preview, using the Customizer or requesting the editor version with ?context=edit
|
warming |
A post was just saved. Try again in a moment. |
redis_unavailable |
See Cannot connect to Redis |
outage_recovery |
Redis was down during an edit. Stored pages are being cleared once, then caching resumes. |
empty_main |
The main content did not render. Check the page has content, and that the theme outputs it inside <main> or <body>. |
empty_body, status_not_200, is_404
|
The page is not returning a normal 200 response |
is_search, is_feed
|
Not cached by design |
protected_post |
The post has a password or is not published |
host_mismatch, ip_host
|
See the next step |
local_dev_asset_reference |
The page links to assets on a local development address |
On versions before 0.10.4 the header gives fewer reasons. Turn on WP_DEBUG and read the last line of the page source instead.
A page is only stored when the request's host matches the site address in Settings > General. www.example.com against a site address of example.com is a mismatch, as is an IP address or a staging name. Request the site by its own address.
Another caching or optimisation plugin, or code that starts its own output buffer, can leave the plugin with nothing to store. Turn other page caches off. Only one page cache should be active on a site.
The drop-in reports why.
| Value | Cause and fix |
|---|---|
No X-Ace-Early header |
The drop-in did not run or stood aside. Check WP_CACHE is true, wp-content/advanced-cache.php exists, the PHP extension for the selected back end is loaded, and you are sending no login or basket cookies. |
MISS no-connection |
The drop-in cannot reach Redis. It reads its Redis address from wp-config.php: set ACEREDIS_HOST, ACEREDIS_PORT, ACEREDIS_PASSWORD, or ACEREDIS_PAGE_HOST with tls:// for a TLS server. |
MISS no-tokens |
It connected to a Redis that holds nothing for this site. Almost always the wrong database: set ACEREDIS_DB to the one the plugin uses. Otherwise the wrong host, or no page has been rendered by WordPress since the cache was cleared. |
MISS no-key |
No stored copy of this page yet. Check X-AceRedisCache for why WordPress is not storing it. |
MISS dynamic |
The page has live blocks with no usable copy. Turn on Dynamic Microcache, or accept that this page is assembled by WordPress. |
HIT; dark-launch |
Working, but not serving. Define ACEREDIS_EARLY_SERVE as true. |
When Redis is the selected back end, it must answer the connection test before caching can be switched on. Saving the settings with the cache enabled, or with a new host, port, password or TLS setting, tests the connection first. If it fails, your previous settings stay and the message says what failed: extension missing, connection refused, authentication or timeout.
If wp-admin cannot reach Redis but the front end can, skip the test:
define( 'ACEREDIS_SKIP_CONNECTION_TEST', true );Check the extension first.
php -m | grep -i redisNothing printed means the PHP Redis extension is missing. Install it and restart PHP. Remember the web server's PHP and the command line PHP can be different versions.
Check the server from the web server's own shell.
redis-cli -h 127.0.0.1 -p 6379 ping| Result | Cause |
|---|---|
PONG |
Redis is fine. Check the host, port and password in the settings. |
Connection refused |
Redis is not running, or is listening on a different address or port |
NOAUTH |
A password is needed |
| Hangs | A firewall or security group is dropping the connection |
TLS. A server that requires TLS refuses plain connections, often by hanging. Tick TLS Encryption. For the page cache drop-in, use tls:// in ACEREDIS_PAGE_HOST.
Sentinel. If the save fails because none of the sentinels named a primary for the service, check the service name matches the one the sentinels use, and that the web server can reach at least one sentinel on its port (26379 by default).
Redis Cluster. Use database 0 and check every primary reported by Status or Site Health. A reachable seed alone is insufficient. If any primary is unavailable, requests bypass the cache until the cluster recovers. For the early page cache, copy the seed constant shown on the settings screen into wp-config.php.
Sockets. If Redis only listens on a Unix socket, PHP's user must be able to read it. Set ACEREDIS_SOCKET to its path.
Class "Redis" not found
This was a fault in versions before 0.10.3, on servers without the PHP Redis extension. Update the plugin. With the Redis back end selected, a missing extension now leaves the site serving uncached pages and displays a notice in wp-admin.
If you cannot reach wp-admin to update:
- Delete
wp-content/object-cache.phpandwp-content/advanced-cache.php. - Set
WP_CACHEtofalseinwp-config.php. - Replace the plugin's folder with the current version.
Then install the extension, so the plugin has something to cache with, and set up again.
In order of how much they turn off:
| Step | Effect |
|---|---|
Add ?aceredis_nocache=1 to a URL |
That one request skips the page cache |
define( 'ACEREDIS_EARLY_SERVE', false ); |
Hits are served by WordPress, not the drop-in |
define( 'ACEREDIS_OC_BYPASS', true ); |
Object cache off |
define( 'WP_CACHE', false ); |
Page cache drop-in not loaded |
define( 'ACEREDIS_DISABLED', true ); |
Everything off, without touching the settings. The plugin and both drop-ins stand aside for every request. Remove the line to switch back on. |
| Untick Enable Cache | Everything off |
Then find the cause with a clear head.
This is expected on a single-server site using the APCu back end. The next web requests repopulate the cache. Test APCu from the settings screen, since command-line PHP cannot inspect the web server's memory. If edits from WP-CLI or system cron fail to reach the next web request, check that both users can write to wp-content/cache/aceredis/.
If the Redis local memory tier is enabled, autoloaded options changed on another web server or from WP-CLI may retain their old values for the configured lifetime (five seconds by default).
You edited a post and the page is unchanged. Recaching after an edit runs from cron. Check cron is running:
wp cron event list | grep aceredisIf events are overdue, WP-Cron is not being triggered. Set up a system cron that calls wp-cron.php, or run wp cron event run --due-now.
The page changed for you but not for visitors. There is another cache in front. If it is Varnish, see Varnish and CDNs. If it is a CDN, purge it, and hook the plugin's purge actions to it so it stays in step.
You deployed new markup or styles and old pages remain. A deploy changes every page. Soft purge:
wp eval 'aceredis_soft_purge_page_cache( true );'Or clear outright on a small site with Clear All Cache.
Your HTML rewrite works on the first view and vanishes on the next. It runs in an output buffer of its own, outside what is stored. Move it to the wp_template_enhancement_output_buffer filter. See Page cache.
A signed-in user sees a guest page. Something in front of WordPress is caching pages for requests that carry login cookies, or stripping the cookies. The plugin's drop-in stands aside for any WordPress login cookie. Check your proxy or CDN.
A user sees another user's details. Turn Serve cached pages to logged-in users off at once and clear the cache. Then find what prints personal details into the page and either make it a live block or add it with aceredis_logged_in_store_block. Please report it too.
A basket page shows another visitor's basket, or an empty one. The basket page is being cached by something. Ace Redis Cache never caches it. Check the cache in front of WordPress, and that your basket page is the one set in WooCommerce's settings.
Product pages stop caching once a visitor has browsed. They have something in their basket, or WooCommerce set its session cookie. That is intended. Keep Cart Cookie on Product Pages on so guests who only browse stay cacheable.
A value I cache is never there. It may be over the size limit (64 KB), in a group that is not stored in Redis, or set from a signed-in request, which does not write. See Object cache.
wp-admin is slow. By default wp-admin does not read Redis. Turn on wp-admin screens read the object cache and the wp-admin query cache.
Redis fills up. Set a maxmemory and an eviction policy on the server, and lower Object Cache Max TTL. Check what is there:
redis-cli -n 0 info keyspaceScheduled events do not run, or wp cron event list looks wrong. Make sure the object-cache.php in wp-content matches the plugin's copy. See Drop-ins.
Update to 0.10.4. The plugin's internal trace lines are then written only when wp-config.php has define( 'ACEREDIS_DEBUG_TRACE', true ); as well as WP_DEBUG. Real problems, such as a connection that failed, are still logged under WP_DEBUG.
"Foreign drop-in detected". Another plugin's object-cache.php or advanced-cache.php is in wp-content. Turn that plugin's cache off through its own settings so it removes its file, then save the Ace Redis Cache settings again.
"The object-cache.php file could not be updated". wp-content is not writable by PHP, or the file is a symlink. Fix the permissions, or copy the file in as part of your deploy.
Behaviour does not match the plugin version. The drop-ins are older than the plugin. Press Update Drop-in on the Caching tab, or copy them from assets/dropins/.
Gather the details listed on Reporting problems and open an issue.
Ace Redis Cache: a page cache and object cache for WordPress, backed by Redis or Valkey. Written and maintained by Shane Rounce at AceMedia. Website · Repository · Issues · GPLv2 or later
Setting up
The caches
Your stack
Reference
Help
