ProRank SEO

Caching & CDN

ProRank SEO includes page caching, browser caching rules, and CDN purge integration. These features are available in the Free tier. Configure them from ProRank SEO → Performance.

Page Cache

When enabled, ProRank generates static HTML files for your pages and serves them directly on subsequent requests, bypassing PHP and database queries. Cached files are stored under wp-content/uploads/prorank-cache/html/.

Cache Headers

ProRank adds response headers so you can verify cache status:

  • X-ProRank-Cache: HIT – served from cache
  • X-ProRank-Cache: MISS – not cached, generated fresh
  • X-ProRank-Cache-Reason – explains why a request was not cached (e.g. logged_in, query_string)

Automatic Invalidation

Cache is automatically cleared when:

  • A post is published, updated, or deleted
  • A post changes status (draft → publish, etc.)
  • Cache settings are updated
  • The theme is switched
  • You click Clear Cache in the admin bar

Manual Cache Clear

Click the ProRank cache-clear button in the WordPress admin bar, or use the Clear All Caches button in Advanced Settings.

Browser Cache

ProRank can write .htaccess rules that set Cache-Control andExpires headers for static assets (CSS, JS, images, fonts). This tells browsers to cache assets locally, reducing repeat-visit load times.

Cache Keep-Warm

When page caching and cache preload are both enabled, ProRank schedules a recurring job that re-requests core URLs so they stay in cache. This prevents cold-cache Lighthouse score swings.

  • Cadence: Fixed at 15 minutes
  • URLs warmed: Homepage (/) and the WordPress posts page (if a static front page is set)
  • Gated by: Page cache and cache preload must both be active

CDN Purge Integration

ProRank can automatically purge your CDN cache when WordPress content changes. Configure your CDN provider from ProRank SEO → Performance → Cache & CDN.

Supported Providers

  • Cloudflare
  • BunnyCDN
  • Fastly
  • Amazon CloudFront
  • KeyCDN
  • Generic webhook (for any provider with a purge URL)

Each provider requires its own credentials (API key, zone ID, etc.). Enter them in the Performance settings. ProRank fires a purge request to your configured provider whenever the page cache is cleared.

CDN URL Rewrite

ProRank can rewrite local static asset URLs (CSS, JS, images, fonts) to a CDN hostname. Configure this from ProRank SEO → Support & Account → Advanced Settings → CDN URL Rewrite.

  • CDN URL: Full hostname including protocol (e.g. https://cdn.example.com). Leave blank to disable.
  • Directories: Comma-separated list of directories to rewrite. Default: wp-content,wp-includes
  • Exclusions: Comma-separated URL substrings to exclude from rewriting

Cache invalidation

When the CDN URL setting changes, ProRank automatically clears its page cache, Elementor rendered cache, WP object cache, and WP Rocket cache (if active).

CDN URL rewriting is independent of the performance profile and compatibility mode. It is not suppressed on builder sites.

Configuration

Cache and CDN settings are stored in the prorank_cache_settings WordPress option. You can modify them from the admin UI or via the REST API.

wp-config.php

One optional constant is supported:

// Override the cache storage directory (optional)
define('PRORANK_CACHE_DIR', WP_CONTENT_DIR . '/my-custom-cache');

If not defined, cache files are stored in wp-content/uploads/prorank-cache/html/.

REST API

  • POST /wp-json/prorank-seo/v1/cache/clear

    Clear all page cache files.

  • POST /wp-json/prorank-seo/v1/cache/preload

    Trigger a cache preload run.

  • GET /wp-json/prorank-seo/v1/cache/stats

    Retrieve cache statistics (file count, total size, hit rate).

All endpoints require manage_options capability.

WP-CLI

# Trigger a cache preload run
wp prorank cache preload

This is the only cache-related WP-CLI command currently available. Cache clearing is done via the admin bar button, the REST API, or thedo_action('prorank_clear_cache') hook.

Actions

ProRank fires these actions that other plugins or custom code can hook into:

  • do_action('prorank_clear_cache')

    Fires when all caches should be cleared. Call this action to programmatically clear ProRank page cache.

  • do_action('prorank_cache_cleared', $type, $id)

    Fires after cache has been cleared. $type is 'all', 'post', or 'post_status_change'. $id is the post ID or null.

  • do_action('prorank_cache_saved', $file, $payload)

    Fires after a page cache file is written.

Troubleshooting

Pages not caching

  • Check X-ProRank-Cache and X-ProRank-Cache-Reason response headers
  • Logged-in users are never served cached pages
  • Pages with query strings are excluded by default
  • Verify that wp-content/uploads/prorank-cache/html/ is writable

CDN not purging

  • Verify your CDN provider credentials in Performance settings
  • Use the Test Connection button to confirm ProRank can reach your CDN API
  • Check wp-content/prorank-seo-debug.log if debug mode is enabled