Answering my own question in case someone else comes here looking too. I went through a ChatGPT session and it was suggested I add this to .htaccess for Apache server. So far this is working.
# Exclude Rank Math from caching
<IfModule mod_headers.c>
<FilesMatch "^wp-json/rankmath/.*$">
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "0"
</FilesMatch>
</IfModule>
If that doesn’t work for you, try:
<IfModule mod_rewrite.c>
RewriteEngine On
# Exclude Rank Math REST API from caching
RewriteCond %{REQUEST_URI} ^/wp-json/rankmath/ [NC]
RewriteRule .* - [E=Cache-Control:no-cache]
# Also exclude wp-admin and wp-login.php (optional but recommended)
RewriteCond %{REQUEST_URI} ^/wp-admin [OR]
RewriteCond %{REQUEST_URI} ^/wp-login\.php
RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>
I f you don’t have access to .htaccess, try:
- Check Breeze Advanced Settings
- Ensure “Disable Cache for Administrator” is enabled.
- Under “Exclude URLs”, manually add:
/wp-json/rankmath/*
/wp-admin/*
Refresh admin dashboard and then clear cache again. Rank Math Widget should appear okay.
Wait a day for the auto cache clearing and double check that Rank Math Widget is okay.
Thanks for sharing the details.
Could you please confirm whether the Exclude URL pattern you have used is working as expected?
Additionally, after applying the .htaccess rule, are all pages of the site being served by Breeze cache, and do the Breeze settings reflect correctly? It’s possible that this may conflict with certain functionalities of the activated theme or plugins.