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 cacheX-ProRank-Cache: MISS– not cached, generated freshX-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, and other selected file types) to one or more CDN origins. Configure this from ProRank SEO → Support & Account → Advanced Settings → CDN URL Rewrite.
Asset Routes
New in 1.6.0, Free and Premium can define up to four ordered Asset routes. Each enabled route contains:
- CDN origin: An HTTP or HTTPS origin, optionally with a path prefix (for example,
https://images.example.com). - Directories: Comma-separated local directories that the route may rewrite (for example,
wp-content/uploads). - File extensions: Comma-separated file types without leading dots (for example,
jpg,jpeg,png,webp,avif). - Exclusions: Comma-separated URL substrings that prevent this route from matching.
ProRank evaluates enabled routes from Route 1 to Route 4. The first route whose directory and extension rules match—and whose exclusions do not match—owns that asset. If no route matches, the original local URL is left unchanged.
Single-Origin Fallback
Existing installations can keep using the legacy CDN URL, Directories, and Exclusions fields. ProRank uses those fields as one fallback route only while the Asset routes list is empty; its file extensions use ProRank's built-in static-asset defaults.
A route row replaces the legacy fallback
Cache invalidation
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/clearClear all page cache files.
POST /wp-json/prorank-seo/v1/cache/preloadTrigger a cache preload run.
GET /wp-json/prorank-seo/v1/cache/statsRetrieve cache statistics (file count, total size, hit rate).
All endpoints require manage_options capability.
WP-CLI
# Trigger a cache preload run
wp prorank cache preloadThis 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.
$typeis'all','post', or'post_status_change'.$idis 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-CacheandX-ProRank-Cache-Reasonresponse 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.logif debug mode is enabled