• Resolved johnamp

    (@johnamp)


    We are using Breeze on a Multisite installation. On sites that use Rank Math SEO plugin, we are seeing that the dashboard results for it are showing encoded html and not the nice tables it should.

    View post on imgur.com

    Apparently the dashboard is cached by Breeze. I have administrators set to no cache under options though.

    https://wordpress.org/support/topic/problem-with-rank-math-overview-in-wordpress-dashboard/

    They recommend adding  /wp-json/rankmath/ to a Cloudway endpoint, or Varnish or Reddis endpoint. I am not using either and our site is on an Apache server. We have the Varnish option turned off as well.

    is there a way to set this on Apache?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter johnamp

    (@johnamp)

    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:

    1. 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.

    Plugin Author owaisalam

    (@owaisalam)

    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.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Breeze and Rank Math Dashboard issue’ is closed to new replies.