Prime Cache Manual (Pro Edition)
Version 1.7.30 | PHP 7.4+ | WordPress 5.8+ | Requires Prime Cache (Free) 1.10.20+ installed & active
The Pro edition adds AVIF conversion, Critical CSS / Remove Unused CSS, Delay JS, Cloudflare / Sucuri / Varnish integrations, Persistent Object Cache (APCu / Redis / Memcached), database optimization, YouTube thumbnail replacement, and more on top of every Free feature.
For settings available in the Free version, please refer to the Free Manual. (WebP conversion itself moved into the Free edition in 1.10.0; Pro layers AVIF on top.)
Prime Cache Pro is an add-on plugin. The Free version of Prime Cache must be installed and activated before Pro features become available. All Free features remain fully functional; Pro extends them with the capabilities documented in this manual. The bundled feature list is also visible inside WordPress at Prime Cache → Pro Features (a dedicated information page introduced in Free 1.10.14).
Getting Started
License Activation
After purchasing a Pro license, you will receive a license key by email. The key format is RPLS-XXXX-XXXX-XXXX-XXXX. Follow the steps below to activate Pro features on your site.
How to Activate:
- Make sure the free Prime Cache plugin is installed and activated.
- Install the Prime Cache Pro add-on plugin via the WordPress admin panel (Plugins → Add New → Upload Plugin).
- Activate Prime Cache Pro.
- Go to Prime Cache → License in the WordPress admin menu.
- Paste your license key into the License Key field.
- Click Activate License.
- The status indicator should change to Active. Pro settings will become available immediately.
| Field | Description |
|---|---|
| License Key | Your RPLS-XXXX-XXXX-XXXX-XXXX key from the purchase confirmation email |
| License Status | Active / Inactive / Expired |
| Expiration Date | Displayed after successful activation |
| Site URL | The domain tied to this license (one license per production domain) |
https://raplsworks.com/wp-content/uploads/ai-chatbot/rpls-license-api.php. Your server must be able to make outbound HTTPS requests. Verify that allow_url_fopen or cURL is enabled if activation fails.
Server Requirements
Most Pro features work on any standard WordPress hosting environment. Some features have additional requirements:
| Feature | Requirement |
|---|---|
| WebP Conversion | PHP GD extension with WebP support, or Imagick |
| AVIF Conversion | PHP Imagick 3.4.4+ with libavif, or GD compiled with AVIF support (PHP 8.1+) |
| Object Cache (APCu) | PHP APCu extension enabled (apc.enabled=1) |
| Object Cache (Redis) | PHP phpredis or predis extension; Redis server reachable |
| Object Cache (Memcached) | PHP Memcached extension; Memcached daemon reachable |
| .htaccess Optimization | Apache with mod_rewrite, mod_expires, mod_deflate enabled |
| Speculation Rules API | Chrome 109+ (non-supporting browsers silently ignore the rules) |
| Brotli Compression | Apache mod_brotli or Nginx ngx_brotli module |
Quick Start for Pro
After activating your license, the recommended order for enabling Pro features is:
- File Optimization tab — Enable Combine CSS, Combine JS, then Delay JavaScript. Test your site after each step.
- Critical CSS tab — Click “Generate” to auto-generate above-the-fold CSS. Verify the result visually.
- Media tab — Enable WebP conversion, then run Bulk Optimization on existing images.
- CDN tab — If you use a CDN, enter the CDN URL and optionally configure Cloudflare API credentials.
- Preload tab — Enable cache preloading and link prefetching. Enable Speculation Rules for Chrome.
- Object Cache tab — Select APCu, Redis, or Memcached based on your server’s available extensions.
- Database tab — Review cleanup items and set an automatic schedule (weekly is a safe default).
File Optimization (Pro)
Pro unlocks advanced file optimization capabilities that reduce HTTP requests, eliminate render-blocking resources, and dramatically cut page load times. These settings are found under Prime Cache → File Optimization.
Combine CSS
Merges all CSS files enqueued by WordPress into a single stylesheet, reducing the number of HTTP requests the browser must make before rendering the page.
| Setting | Default | Description |
|---|---|---|
| Combine CSS | Disabled | Merge all CSS files into one combined file |
| Exclude CSS Files | Empty | File paths or handles to exclude from combining (one per line). Use partial matches. |
| Inline Small CSS | Disabled | Inline CSS files smaller than the configured threshold directly into <style> tags, eliminating HTTP requests for tiny stylesheets |
| Inline Threshold | 2 KB | CSS files below this size are inlined rather than combined |
How to Configure:
- Go to Prime Cache → File Optimization
- Enable Combine CSS
- Load your homepage in a private/incognito window to check for visual issues
- Add any broken stylesheet paths to the Exclude list
- Save settings and purge the cache
Combine JavaScript
Merges all JavaScript files into a single bundle, reducing HTTP requests. Combined with defer, this can dramatically lower Time to Interactive (TTI).
| Setting | Default | Description |
|---|---|---|
| Combine JavaScript | Disabled | Merge all JS files into one combined file |
| Exclude JS Files | Empty | Paths or handles to exclude from combining (one per line) |
document.write() cannot be combined. Always exclude inline event handlers and scripts that must remain in <head>.
Defer JavaScript
Adds the defer attribute to script tags, preventing JavaScript from blocking the HTML parser. Deferred scripts execute after the DOM is fully parsed but before DOMContentLoaded.
| Setting | Default | Description |
|---|---|---|
| Defer JavaScript | Disabled | Add defer attribute to all script tags |
| Exclude from Defer | Empty | Script handles or paths that should NOT be deferred |
$() or jQuery() before jQuery loads will throw errors. Prime Cache automatically wraps inline jQuery code in a DOMContentLoaded listener to handle this safely. If you notice jQuery errors after enabling defer, add the offending script to the exclude list.
Delay JavaScript
Delays the loading and execution of all JavaScript until the user interacts with the page (scroll, click, touch, or keypress). This can dramatically improve Largest Contentful Paint (LCP) and First Input Delay (FID) scores, especially on mobile.
| Setting | Default | Description |
|---|---|---|
| Delay JavaScript | Disabled | Delay all JS execution until first user interaction |
| Delay JS Safe Mode | Disabled | Only delay external (third-party) scripts. Internal scripts run normally. Safer for complex themes. |
| Delay Timeout | 5 seconds | Maximum time to wait for interaction before loading JS anyway (prevents blank screens on non-interactive sessions) |
| Exclude from Delay | Empty | Script handles or URL fragments that should NOT be delayed |
| Third-party Presets | Empty | Preset rules for common third-party scripts (Google Tag Manager, Meta Pixel, HubSpot, etc.) |
Interaction events that trigger JS loading:
scroll— page is scrolledclick/touchstart— user taps or clickskeydown— any key is pressedmousemove— mouse moves (desktop only)
Critical CSS
Critical CSS contains only the styles needed to render above-the-fold content. It is inlined in the <head> so the browser can paint the visible page immediately, without waiting for full stylesheets to download.
| Setting | Default | Description |
|---|---|---|
| Critical CSS Enabled | Disabled | Enable Critical CSS feature |
| Auto-Generate | Disabled | Automatically extract critical CSS from page output |
| Manual Critical CSS | Empty | Paste manually written critical CSS here (overrides auto-generated if filled) |
| Per-Template Critical CSS | Disabled | Define different critical CSS for homepage, single posts, archives, and WooCommerce pages |
| Fallback Behavior | Async CSS | How to load the full stylesheet after critical CSS: Async (media=print onload) or Preload |
Auto-Generate Process:
- Enable Critical CSS and click Generate on the homepage (or any representative page)
- Prime Cache renders the page at a standard viewport size and extracts above-the-fold styles
- The result is stored and inlined on subsequent cached page serves
- Preview the page visually to verify no content is unstyled during load
- If any visible element appears unstyled, add its CSS selector to the Include Selectors list and regenerate
Remove Unused CSS
Analyzes each page and strips CSS rules that do not apply to any element on that specific page. This can reduce stylesheet size by 60-90% on sites using large CSS frameworks like Bootstrap or Tailwind.
| Setting | Default | Description |
|---|---|---|
| Remove Unused CSS | Disabled | Enable per-page CSS stripping |
| Safelist Selectors | Empty | CSS selectors to always keep, even if not detected on page load (e.g., dynamically added classes, modal selectors). One per line, supports wildcards. |
| Excluded Pages | Empty | URL patterns where unused CSS removal should not run (e.g., page builder edit URLs) |
Local Google Analytics Hosting
Downloads and self-hosts gtag.js (Google Analytics 4) or analytics.js (Universal Analytics) on your own server. This eliminates the Google DNS lookup and allows the script to be served from your CDN, improving PageSpeed scores and reducing third-party render-blocking time.
| Setting | Default | Description |
|---|---|---|
| Local Analytics Enabled | Disabled | Self-host the Google Analytics script |
| Measurement ID | Empty | Your GA4 Measurement ID (e.g., G-XXXXXXXXXX) or UA-XXXXXX-X |
| Update Frequency | Weekly | How often to refresh the locally cached script (Daily / Weekly / Monthly) |
| Script Position | Header | Enqueue in <head> (recommended) or footer |
How to Configure:
- Go to Prime Cache → File Optimization → Local Analytics
- Enable Local Analytics
- Enter your GA4 Measurement ID (found in Google Analytics → Admin → Data Streams)
- Save settings. Prime Cache will download the script immediately.
- Verify in PageSpeed Insights that the Google Analytics script is no longer flagged as third-party
gtag.js regularly. Set the update frequency to Weekly to stay current without sacrificing the caching benefits of local hosting.
Google Fonts Optimization
Control how Google Fonts are loaded. These settings apply to fonts loaded via the Google Fonts API (fonts.googleapis.com). Configured under Prime Cache → File Optimization → Google Fonts.
| Option | Description |
|---|---|
| Combine | Merge multiple fonts.googleapis.com API requests into a single request. Reduces DNS lookups when a theme loads many font families separately. |
| Self-host | Download all requested Google Fonts (all weights and subsets) to your server and serve them locally. Eliminates the Google Fonts CDN DNS lookup entirely and ensures GDPR-friendlier font loading. |
| Display Swap | Append display=swap to all Google Fonts requests so text remains visible using a fallback font while the custom font loads. Prevents invisible text flash (FOIT). |
| Disable | Completely dequeue all Google Fonts requests. Use this if you have already replaced all Google Fonts with locally hosted equivalents in your theme. |
<preconnect> hint for fonts.gstatic.com during the download phase and removes it afterward. After fonts are self-hosted, the preconnect is no longer needed and is omitted from page output.
Media Optimization (Pro)
WebP conversion itself, bulk Media Library optimization, and the three delivery methods (.htaccess rewrite, <picture> tag, URL rewrite) are part of the Free edition (since 1.10.0). The Pro add-on layers AVIF conversion, AVIF-specific quality control, EXIF stripping, on-upload resize, and YouTube thumbnail replacement on top. Settings are under Prime Cache → Media.
WebP & AVIF Conversion
WebP conversion is configured in the Free plugin (see the Free Manual). When the Pro add-on is active, the same Media tab gains an AVIF toggle and AVIF-specific quality controls. At delivery time the browser receives AVIF, WebP, or the original file automatically based on its Accept header — Safari and other AVIF-less browsers cleanly fall back to the Free WebP variant.
| Setting | Provided by | Default | Description |
|---|---|---|---|
| WebP Conversion | Free (since 1.10.0) | Disabled | Convert uploads to WebP format automatically on upload |
| AVIF Conversion | Pro add-on | Disabled | Convert uploads to AVIF format automatically on upload. Requires Imagick with libavif or GD with AVIF (PHP 8.1+). |
| Conversion Library | Free / Pro | Auto-detect | GD or Imagick. Auto-detect selects the best available library. |
Quality Control & EXIF Removal
Fine-tune output quality and strip unnecessary metadata from converted images.
| Setting | Default | Description |
|---|---|---|
| Lossy Compression | Disabled | Apply lossy compression for smaller file sizes (recommended for photographs) |
| Lossless Compression | Disabled | Apply lossless compression. Larger files than lossy but no quality reduction (recommended for graphics and logos) |
| Custom Quality | 82 | WebP/AVIF quality level (1-100). 80-85 is visually lossless for most photographs. |
| WebP Quality | 82 | Quality level specifically for WebP output |
| AVIF Quality | 60 | Quality level for AVIF output. AVIF achieves good quality at lower values than WebP. |
| Remove EXIF Data | Disabled | Strip EXIF metadata (camera model, GPS location, timestamps) from converted images. Recommended for privacy and smaller file sizes. |
Image Resize on Upload
Automatically downscale oversized images when they are uploaded to the Media Library. This prevents unnecessarily large originals from consuming disk space and being served to visitors.
| Setting | Default | Description |
|---|---|---|
| Resize on Upload | Disabled | Resize images exceeding the configured maximum dimensions on upload |
| Max Width | 2560 px | Maximum image width after resize. Images narrower than this are not resized. |
| Max Height | 2560 px | Maximum image height after resize |
Bulk Optimization
Convert and compress all existing images in your Media Library without re-uploading them. A real-time AJAX progress bar shows conversion status per image.
| Feature | Description |
|---|---|
| Start Bulk Optimization | Begin converting all unoptimized images. Processes in batches to avoid server timeouts. |
| Progress Bar | Shows current image number, total count, and percentage complete in real time |
| Pause / Resume | Pause optimization at any time and resume later without losing progress |
| Per-image Status | Each image shows its status: Optimized, Skipped (already done), or Failed (with reason) |
| Restore Originals | Roll back a selected image to its pre-optimization state if backups are enabled |
| Statistics | Total bytes saved, average compression ratio, number of images optimized |
How to Run Bulk Optimization:
- Configure WebP and/or AVIF conversion settings first
- Go to Prime Cache → Media → Bulk Optimization
- Review the summary (total images, estimated time)
- Click Start Bulk Optimization
- Monitor progress. You can navigate away and return; the process continues in the background.
- Review the completion report for any failed images and address them individually if needed
Image Delivery Methods
Choose how converted WebP/AVIF images are served to browsers that support them. Prime Cache supports three delivery methods to accommodate different server configurations.
| Method | How It Works | Best For |
|---|---|---|
| .htaccess Rewrite | Apache rewrite rules serve the WebP/AVIF version when the browser sends a matching Accept header and the converted file exists. Zero JavaScript, no extra HTML markup. | Apache hosting; maximum performance |
| <picture> Tag | Replaces <img> tags with <picture> elements containing multiple <source> elements. Browser selects the best supported format automatically. | Nginx / LiteSpeed; shared hosting without .htaccess access |
| URL Rewrite | Rewrites image URLs directly to the WebP/AVIF file path. Simpler than picture tags but relies on all browsers accepting the URL-referenced format. | Edge cases where picture tags cause layout issues |
.htaccess.
Per-folder Include/Exclude: By default, all image uploads are converted. You can restrict conversion to specific folders or exclude certain directories:
- Include folders: Only convert images in these paths (e.g.,
wp-content/uploads/,wp-content/themes/) - Exclude folders: Skip these paths during conversion (e.g.,
wp-content/uploads/2020/for archive images you do not want to re-convert)
YouTube Thumbnail Replacement
Replaces YouTube iframe embeds with a lightweight thumbnail image and a play button overlay. The actual YouTube player iframe loads only when the visitor clicks the thumbnail, dramatically reducing page weight for pages with multiple embedded videos.
| Setting | Default | Description |
|---|---|---|
| YouTube Thumbnail Replacement | Disabled | Replace YouTube iframes with clickable thumbnails |
| Thumbnail Quality | High (hqdefault) | YouTube thumbnail resolution: maxresdefault (1280px) / hqdefault (480px) / mqdefault (320px) |
| Play Button Style | Default | Built-in play button overlay style: Default, Large, Custom |
CDN Integration
Connect Prime Cache to your Content Delivery Network for global asset distribution. Settings are under Prime Cache → CDN.
CDN URL Rewriting & Domain Sharding
Rewrites static asset URLs to point to your CDN pull-zone, offloading bandwidth and serving assets from the closest CDN edge node to your visitors.
| Setting | Default | Description |
|---|---|---|
| CDN URL Rewriting | Disabled | Enable CDN URL rewriting for static assets |
| CDN URL | Empty | Your CDN pull-zone URL (e.g., https://cdn.example.com) |
| Include File Types | js, css, png, jpg, gif, webp, avif, woff2, svg | File extensions to rewrite to CDN URLs |
| Exclude Paths | Empty | URL path patterns to exclude from CDN rewriting (one per line) |
| Domain Sharding | Disabled | Enable multiple CDN hostnames for parallel asset downloads |
| Shard Hostnames | Empty | Up to 4 CDN hostnames (e.g., cdn1.example.com, cdn2.example.com). Assets are distributed round-robin. |
How to Configure:
- Create a pull-zone in your CDN provider’s dashboard pointing to your WordPress site origin URL
- Copy the CDN pull-zone URL (e.g.,
https://yoursite.b-cdn.net) - Go to Prime Cache → CDN
- Enable CDN URL Rewriting
- Paste your CDN URL
- Save settings and purge all cache
- Open browser DevTools (Network tab) and confirm static assets are loading from the CDN hostname
Cloudflare Integration
When your site is proxied through Cloudflare, Prime Cache can automatically purge the Cloudflare edge cache whenever WordPress content is updated. This ensures visitors always see fresh content without waiting for the default Cloudflare cache TTL to expire.
| Setting | Default | Description |
|---|---|---|
| Cloudflare Integration | Disabled | Enable Cloudflare API integration |
| API Token | Empty | Cloudflare API Token with Zone.Cache Purge permission |
| Zone ID | Empty | Your Cloudflare Zone ID (found in the Zone Overview page) |
| Zone Purge on Flush | Enabled | Purge the entire Cloudflare zone cache when Prime Cache’s “Purge All” is triggered |
| Per-URL Purge | Enabled | Purge only the specific URL(s) affected when a post is updated, rather than the entire zone |
Creating a Cloudflare API Token:
- Log in to your Cloudflare dashboard
- Go to My Profile → API Tokens
- Click Create Token
- Use the Edit Cloudflare Workers template, or create a custom token
- Set permissions: Zone → Cache Purge → Purge
- Limit the token to your specific zone (domain)
- Create the token and copy it immediately (it is only shown once)
- Paste the token and your Zone ID into Prime Cache CDN settings
- Click Test Connection to verify
Sucuri Firewall Integration
If your site uses the Sucuri Website Application Firewall (WAF), Prime Cache can clear Sucuri’s cache automatically when content changes.
| Setting | Default | Description |
|---|---|---|
| Sucuri Integration | Disabled | Enable Sucuri cache sync |
| API Key | Empty | Sucuri API key (found in Sucuri Dashboard → API) |
| API Secret | Empty | Sucuri API secret |
Varnish HTTP PURGE
For hosting environments with a Varnish cache in front of the web server, Prime Cache can send HTTP PURGE requests to invalidate specific cached objects.
| Setting | Default | Description |
|---|---|---|
| Varnish Integration | Disabled | Enable Varnish PURGE requests |
| Varnish IP | 127.0.0.1 | IP address of the Varnish server (usually localhost for co-located setups) |
| Varnish Port | 6081 | Varnish listening port |
| Use Regex Purge | Disabled | Use BAN with regex instead of exact URL purge (requires Varnish VCL support) |
Preloading (Pro)
Preloading warms the cache before visitors arrive and signals the browser to fetch resources it will need soon. Pro provides a full suite of preloading tools. Settings are under Prime Cache → Preload.
Cache Preloading
Crawls your site in the background and populates the page cache without waiting for real visitors. Ensures every page is served from cache even on the first visit after a cache purge.
| Setting | Default | Description |
|---|---|---|
| Cache Preloading | Disabled | Enable background cache warming |
| Preload Desktop | Enabled | Preload desktop cache variants |
| Preload Mobile | Disabled | Preload separate mobile cache variants (requires Separate Mobile Cache to be enabled in Page Cache settings) |
| Preload Interval | 900 seconds | Time between preload passes. Lower values keep cache warmer; higher values reduce server load. |
| Concurrent Requests | 3 | Number of parallel preload requests. Increase for faster preloading; decrease on low-resource servers. |
| Preload on Settings Save | Enabled | Automatically start a preload pass when settings are saved |
| Preload on Plugin Activation | Enabled | Start preloading immediately after Prime Cache is activated |
Sitemap Preloading
Reads your XML sitemap to discover URLs and preload them. This is particularly useful for large sites where database-based URL discovery may miss some pages.
| Setting | Default | Description |
|---|---|---|
| Sitemap Preloading | Disabled | Discover URLs from sitemap and include them in preloading |
| Sitemap URL | Auto-detect | Your sitemap URL. Auto-detect finds /sitemap.xml, /sitemap_index.xml, and sitemaps declared in robots.txt automatically. |
| Sitemap Index Support | Enabled | Follow sitemap index files to discover child sitemaps |
Link Prefetching
Instructs the browser to fetch pages the visitor is likely to navigate to next, before they click. When the visitor does click, the page loads from the browser’s cache — appearing nearly instant.
| Setting | Default | Description |
|---|---|---|
| Link Prefetching | Disabled | Enable JavaScript-based link prefetching |
| Hover Prefetch | Enabled | Begin fetching a page when the cursor hovers over its link (typically 200-300ms before a click) |
| Hover Delay | 65 ms | Milliseconds to wait after hover before prefetching, to avoid prefetching on brief accidental hovers |
| Viewport Prefetch | Disabled | Prefetch links as soon as they scroll into the visible viewport using IntersectionObserver |
| Prefetch Limit | 10 | Maximum number of pages to prefetch per session, to avoid excessive bandwidth consumption |
| Exclude Patterns | wp-admin, /cart/, /checkout/ | URL patterns to skip (admin pages, WooCommerce transactional pages, logout links) |
Speculation Rules API
The Speculation Rules API is a modern browser feature (Chrome 109+) that enables prerendering — the browser fetches and renders the full page in a hidden tab before the user navigates to it. When the user clicks a link, the prerendered page is displayed instantly with zero perceptible load time.
| Setting | Default | Description |
|---|---|---|
| Speculation Rules | Disabled | Inject Speculation Rules JSON into page output |
| Speculation Mode | prefetch | prefetch: fetch only (safe, low overhead). prerender: full render (maximum speed, higher resource use). |
| Eagerness | moderate | conservative (on pointer down), moderate (on hover), eager (immediately). Higher eagerness = more pages prerendered but higher bandwidth use. |
| Exclude Patterns | wp-admin, /cart/, /checkout/, /logout/ | URL patterns excluded from prerendering rules |
Example Speculation Rules JSON (generated by Prime Cache):
{
"prefetch": [{
"source": "document",
"where": {
"and": [
{"href_matches": "/*"},
{"not": {"href_matches": ["/wp-admin/*", "/cart/", "/checkout/*", "/logout/"]}},
{"not": {"selector_matches": "a[rel~='nofollow']"}}
]
},
"eagerness": "moderate"
}]
}
LCP Optimization
Largest Contentful Paint (LCP) measures how quickly the largest visible element (typically a hero image) loads. Prime Cache can automatically identify and prioritize LCP elements using fetchpriority="high" and resource preloading.
| Setting | Default | Description |
|---|---|---|
| LCP Optimization | Disabled | Enable automatic LCP element detection and prioritization |
| Add fetchpriority | Enabled | Add fetchpriority="high" to the detected LCP image element |
| Add Preload | Enabled | Add a <link rel="preload"> hint for the LCP image in <head> |
| Skip First N Images | 1 | Apply fetchpriority=”high” to the first N images and skip lazy-loading them. The first image in the viewport is almost always the LCP element. |
| Manual LCP URL | Empty | Override auto-detection by specifying the LCP image URL explicitly |
fetchpriority="high" and removes the loading="lazy" attribute (since the LCP element must not be lazy-loaded). A corresponding preload link is injected in the document head. This signals to the browser to download this image with top priority.
DNS Prefetch & Preconnect
Early connection hints that reduce the overhead of connecting to external domains. These hints are injected into <head> so the browser can resolve DNS, complete the TCP handshake, and negotiate TLS before any resource from those domains is actually requested.
| Setting | Default | Description |
|---|---|---|
| DNS Prefetch | Disabled | Inject <link rel="dns-prefetch"> hints for external domains detected on the page |
| DNS Prefetch URLs | Empty | Manual list of external domains to prefetch (one per line, e.g., //fonts.googleapis.com) |
| Preconnect | Disabled | Inject <link rel="preconnect"> hints (includes DNS + TCP + TLS, stronger than dns-prefetch) |
| Preconnect URLs | Empty | External origins to preconnect to (e.g., https://fonts.gstatic.com) |
| Limit Hints | 4 | Maximum number of preconnect/dns-prefetch hints. Cap at 4 to avoid consuming browser connection capacity. |
| Remove Self-Origin | Enabled | Do not emit hints for your own domain (wasted hint) |
Font Preloading
Automatically detects fonts declared in your CSS @font-face rules and injects <link rel="preload"> hints for them in the document head. This eliminates font-induced layout shift and invisible text flash.
| Setting | Default | Description |
|---|---|---|
| Font Preloading | Disabled | Auto-detect and preload @font-face fonts |
| Manual Font URLs | Empty | Additional font file URLs to preload (one per line). Use for fonts not discoverable from CSS. |
| Preload Limit | 3 | Maximum fonts to preload. More than 3-4 preloads compete for bandwidth and may slow the LCP image. |
Manual Resource Preloading
Specify individual resources to preload. Prime Cache auto-detects the resource type and generates the appropriate <link rel="preload"> tag with the correct as= attribute.
| Setting | Default | Description |
|---|---|---|
| Manual Preload URLs | Empty | One resource URL per line. Type is auto-detected from file extension (script, style, font, image, fetch). |
Example:
/wp-content/themes/my-theme/fonts/hero-font.woff2 /wp-content/themes/my-theme/css/critical-above-fold.css /wp-content/uploads/hero-image.webp
Object Cache
Persistent object caching stores the results of expensive WordPress database queries and function calls in a fast in-memory store. Repeated queries are served from memory rather than hitting the database, dramatically reducing TTFB (Time to First Byte) for dynamic pages. Settings are under Prime Cache → Object Cache.
APCu Backend
APCu (Alternative PHP Cache user store) stores cache data in PHP’s shared memory segment on the same server. It is the simplest backend to configure — no additional daemon required.
| Setting | Default | Description |
|---|---|---|
| Backend | None | Select APCu to use the APCu backend |
| APCu Status | — | System Information shows whether APCu is enabled and its memory allocation |
| Cache Prefix | pc_ | Key prefix to namespace Prime Cache entries within the APCu store |
apc.enabled=1). On shared hosting, it may be enabled by default. On VPS/dedicated servers, install via pecl install apcu and add extension=apcu.so to your php.ini.
Redis Backend
Redis is a high-performance in-memory data store with persistence options and support for multi-server deployments. It is the recommended object cache backend for production sites.
| Setting | Default | Description |
|---|---|---|
| Backend | None | Select Redis to use the Redis backend |
| Host | 127.0.0.1 | Redis server hostname or IP address |
| Port | 6379 | Redis server port |
| Password | Empty | Redis AUTH password (leave empty if no password is set) |
| Database | 0 | Redis database index (0-15) |
| Timeout | 1 second | Connection timeout. Increase if Redis is on a remote server. |
| Cache Prefix | pc_ | Key prefix to namespace entries within the Redis store |
How to Configure Redis:
- Ensure Redis is running on your server (
redis-cli pingshould returnPONG) - Ensure the PHP
phpredisextension is installed and enabled - Go to Prime Cache → Object Cache
- Select Redis as the backend
- Enter the host, port, and password (if any)
- Click Test Connection to verify connectivity
- Save settings. Prime Cache installs the object-cache drop-in (
wp-content/object-cache.php) automatically.
Memcached Backend
Memcached is a distributed memory caching system. It is well-suited for load-balanced environments where multiple web servers share a single cache pool.
| Setting | Default | Description |
|---|---|---|
| Backend | None | Select Memcached to use the Memcached backend |
| Servers | 127.0.0.1:11211 | Memcached server list. One host:port per line for multi-server pools. |
| Cache Prefix | pc_ | Key prefix for Memcached entries |
Memcached extension (libmemcached-based) is required. Note this is different from the older Memcache extension. Verify with php -m | grep memcached.
Database Optimization
WordPress accumulates database bloat over time: post revisions, auto-drafts, orphaned metadata, spam comments, and expired transients. Prime Cache Pro provides a one-click cleanup interface and automatic scheduled maintenance. Settings are under Prime Cache → Database.
Cleanup Items
Each cleanup item shows the current count of affected rows so you can make an informed decision before deleting. Review the counts before running cleanup.
| Cleanup Item | Description |
|---|---|
| Post Revisions | Delete all saved revision history for posts and pages. WordPress stores a new revision on every save; these accumulate rapidly on active sites. |
| Auto Drafts | Remove auto-save drafts that WordPress creates in the background while you edit. They are unnecessary once a post is published. |
| Trashed Posts | Permanently delete posts and pages that have been moved to the WordPress Trash. Equivalent to “Empty Trash.” |
| Spam Comments | Permanently remove all comments marked as spam. Spam accumulates quickly on unprotected sites. |
| Trashed Comments | Permanently remove comments in the Trash. |
| Expired Transients | Delete transient records whose expiry date has passed. These are temporary option values set by plugins and WordPress core; expired ones are never read but remain in the database. |
| All Transients | Delete all transients, including unexpired ones. Use with caution — some plugins rely on transients for caches and will regenerate them on next request. Site performance may temporarily dip after clearing all transients. |
| Table Optimization | Run MySQL OPTIMIZE TABLE on all WordPress tables. Reclaims disk space fragmented by deletions and re-indexes tables for faster queries. |
How to Run Cleanup:
- Go to Prime Cache → Database
- Review the row counts for each cleanup item
- Check the boxes for items you want to clean
- Click Run Cleanup Now
- Wait for the completion notice showing how many rows were deleted
- Click Optimize Tables after deletion to reclaim fragmented space
Automatic Cleanup Schedule
Configure automatic database maintenance on a recurring schedule via WordPress WP-Cron. Set it and forget it.
| Setting | Default | Description |
|---|---|---|
| Automatic Cleanup | Disabled | Enable scheduled automatic cleanup |
| Schedule | Weekly | Cleanup frequency: Daily / Weekly / Monthly |
| Cleanup Items | Revisions, Expired Transients | Which items to clean on each scheduled run. Check only items safe to remove automatically. |
| Next Run | — | Displays the timestamp of the next scheduled cleanup |
wp-cron.php at the desired interval.
Heartbeat API Control
The WordPress Heartbeat API sends AJAX requests to the server at regular intervals to maintain session state, notify about autosaves, and provide live updates. On high-traffic sites, these requests add measurable server load. Prime Cache lets you control Heartbeat behavior per location. Settings are under Prime Cache → Performance Tweaks → Heartbeat.
Heartbeat Settings
Configure the Heartbeat API independently for three locations:
| Location | Default Behavior | Impact of Disabling |
|---|---|---|
| Frontend | Disabled by default in WordPress core | Negligible (not normally active) |
| Admin Dashboard | Active every 60 seconds | Loss of real-time dashboard notifications (plugin updates, comment counts) |
| Post Editor | Active every 15 seconds | Autosave still works; only real-time “post lock” and simultaneous edit warnings are lost |
For each location, three modes are available:
| Mode | Description |
|---|---|
| Allow | Heartbeat operates normally at its default interval. No change from standard WordPress behavior. |
| Reduce Frequency | Heartbeat runs at a longer interval (configurable, 15-300 seconds). Reduces AJAX request frequency while preserving functionality. |
| Disable | Heartbeat is completely disabled for this location. No AJAX polling occurs. |
| Setting | Default | Description |
|---|---|---|
| Frontend Mode | Allow | Heartbeat behavior on the public-facing frontend |
| Admin Dashboard Mode | Allow | Heartbeat behavior in the WordPress admin dashboard |
| Post Editor Mode | Allow | Heartbeat behavior in the block editor and classic editor |
| Custom Interval | 60 seconds | Interval in seconds when Reduce Frequency mode is active (range: 15-300) |
Security & Advanced Caching
Security Headers
Prime Cache can inject HTTP security headers with every response. These headers instruct the browser to enforce security policies that protect visitors against common web attacks. Settings are under Prime Cache → Tools → Security Headers.
| Header | Default Value | Description |
|---|---|---|
HSTS (Strict-Transport-Security) | Disabled | Forces browsers to connect via HTTPS only. Configure max-age (recommended: 31536000 = 1 year), and optionally includeSubDomains and preload. |
| X-Content-Type-Options | Disabled | Set to nosniff to prevent browsers from MIME-sniffing responses away from the declared content type. Mitigates drive-by download attacks. |
| X-Frame-Options | Disabled | Controls whether your site can be embedded in an iframe. Use SAMEORIGIN to allow same-domain framing only, or DENY to block all framing. Prevents clickjacking. |
| X-XSS-Protection | Disabled | Enables legacy browser XSS filter. Set to 1; mode=block. Note: modern browsers rely on CSP instead, but this header supports older browsers. |
| Referrer-Policy | Disabled | Controls how much referrer information is included with requests. Recommended: strict-origin-when-cross-origin (sends full URL within same origin, only origin for cross-origin). |
| Permissions-Policy | Disabled | Restricts which browser features (camera, microphone, geolocation, etc.) pages and embedded content can use. Customize based on your site’s requirements. |
max-age, browsers will refuse HTTP connections to your site for the entire duration. Ensure your HTTPS setup is rock-solid before enabling HSTS. Do not enable preload unless you intend to submit your domain to browser HSTS preload lists (this is very difficult to reverse).
Recommended Security Header Configuration:
Strict-Transport-Security: max-age=31536000; includeSubDomains X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Referrer-Policy: strict-origin-when-cross-origin Permissions-Policy: camera=(), microphone=(), geolocation=()
Advanced Caching Options
Fine-tune how the page cache behaves for specific scenarios. Settings are under Prime Cache → Page Cache → Advanced.
| Setting | Default | Description |
|---|---|---|
| Cookie-Keyed Cache (Vary Cookies) | Empty | List of cookie names. When any listed cookie is present with a specific value, a separate cache variant is stored for that cookie value. Useful for sites with user-specific content variations beyond login state (e.g., currency preference, A/B test assignment). |
| Query-String-Keyed Cache | Disabled | Cache pages separately per query string combination. Required if your site serves different content based on URL parameters. Disabled by default to prevent cache bloat from crawler bots with arbitrary query strings. |
| Cache Query Strings | Empty | Specific query string parameter names to include in cache key (whitelist approach). Parameters not listed are stripped from the cache key. |
| 404 Page Caching | Disabled | Cache 404 Not Found pages. Reduces server load from bots repeatedly requesting non-existent URLs. Cached 404s are served with the correct HTTP status code. |
| Always Purge URLs | Empty | Additional URLs to purge on every cache clear event. Useful for pages that aggregate content (homepage, news index) that should be invalidated whenever any post changes. |
Cache Exclusions
Define rules to prevent specific pages, URL patterns, cookies, user agents, or referrers from being served or stored in the cache. Settings are under Prime Cache → Page Cache → Exclusions.
| Exclusion Type | Description |
|---|---|
| Exclude URLs | URL patterns (one per line, supports wildcards with *) that should never be cached. For example: /account/*, /checkout/*, /api/* |
| Exclude Cookies | If any listed cookie is present in the request, the page is not cached. Default exclusions include WooCommerce cart cookies and login cookies. |
| Exclude User Agents | Requests from matching user agent strings bypass caching. Useful for excluding specific bots or monitoring services that should see live content. |
| Exclude Referrers | Requests arriving from specific referrer domains bypass caching. Rarely needed; use with care. |
Per-Post Cache Control
Disable caching for individual posts or pages directly from the post editor, without creating a URL exclusion rule.
Edit any post or page. In the sidebar, locate the Prime Cache metabox. Check Disable cache for this page. Save the post. That specific URL will now always bypass the cache and serve a live PHP response.
Frequently Asked Questions
FAQ
Q: Does Prime Cache Pro require the free version?
Yes. Prime Cache Pro is an add-on plugin. The free Prime Cache plugin must be installed and activated first. The Pro add-on extends it with additional settings tabs and features.
Q: Can I use the same license key on multiple sites?
No. Each Pro license is tied to one production domain. Purchase additional licenses for additional sites. Development and staging environments may be activated temporarily (deactivate before reactivating on a different domain).
Q: Why does my page look broken after enabling Combine CSS or Combine JS?
CSS/JS combining occasionally breaks sites when stylesheets depend on a specific load order or when scripts use document.write(). To resolve: add the problem script or stylesheet’s filename to the corresponding Exclude list in File Optimization settings. Purge all cache and reload.
Q: WebP images are not being served despite conversion being enabled. What should I check?
- Confirm the converted
.webpfiles exist alongside the originals inwp-content/uploads/ - If using .htaccess Rewrite delivery: verify
mod_rewriteis enabled and the Prime Cache .htaccess rules are present - Check your browser’s request headers — it must send
Accept: image/webp(all modern browsers do) - If using a CDN or reverse proxy, ensure it passes the
Acceptheader to the origin and does not serve a cached JPG to WebP-supporting browsers - Verify the GD or Imagick library is available via System Information
Q: Does Delay JavaScript break the contact form, sliders, or other interactive elements?
It can. Enable Delay JS Safe Mode first (delays only external scripts) to identify if the issue is from first- or third-party scripts. For first-party scripts that break with Safe Mode off, add their URL fragment or script handle to the Delay Exclusion list.
Q: What is the difference between Remove Unused CSS and Critical CSS?
These solve different problems and can be used together:
- Critical CSS: Extracts the styles needed for above-the-fold content and inlines them in <head> so the first paint happens immediately. The full stylesheet is loaded asynchronously.
- Remove Unused CSS: Strips CSS rules that match no elements on a given page. Reduces the full stylesheet size but does not change when it loads.
Critical CSS improves LCP and perceived load speed. Remove Unused CSS reduces total CSS payload. Together, they maximize CSS delivery performance.
Q: The Speculation Rules API is enabled but I do not see faster navigation.
Check that you are testing in Chrome 109+ (or Edge 109+). Open Chrome DevTools → Application → Background Services → Speculation Rules to confirm rules are being parsed and which URLs are being prerendered. If no URLs are listed, check that the page contains internal links and that they are not matching the exclude patterns.
Q: Can I use Prime Cache Pro with a Nginx server?
Yes. All PHP-based features work on Nginx. The .htaccess optimization feature is Apache-specific and should be disabled on Nginx. For WebP/AVIF delivery on Nginx, use the <picture> Tag delivery method instead of .htaccess Rewrite. CDN, preloading, file optimization, and all other features function normally on Nginx.
Q: Does Prime Cache Pro support WordPress Multisite?
Page caching is not supported on multisite installations. All other Pro features (file optimization, image optimization, CDN, preloading, database cleanup, heartbeat control, security headers) work normally on multisite individual sites.
Q: My Cloudflare zone purge is not working. What should I check?
- Verify the API Token has Zone.Cache Purge permission for the correct zone
- Confirm the Zone ID matches the zone your domain is in (visible in the Cloudflare zone Overview page sidebar)
- Ensure your server can make outbound HTTPS requests to
api.cloudflare.com - Click Test Connection in the CDN settings and check the response message for error details
Q: How do I restore an image to its original quality after bulk optimization?
Prime Cache stores the original image alongside the converted versions (it does not overwrite the original). In the Media Library, select the image, click Edit, and use the Restore Original button in the Prime Cache section. Note: if you deactivated Prime Cache and the original was cleaned up by another process, restoration may not be possible — always keep WordPress Media Library backups.
Q: The database cleanup removed my revisions. Can they be recovered?
No. Database cleanup is permanent and irreversible. Always take a full database backup before running cleanup. Many hosting providers offer one-click database backup via phpMyAdmin or cPanel.
