Skip to content

Configuration

Rapida organizes performance features into focused tabs in wp-admin under Rapida.

Under the Page cache tab:

  • Separate cache for phones: Generates dedicated cache copies for mobile devices. Essential when your theme renders different HTML or menus on mobile vs desktop.
  • Cache lifespan (hours): Sets the maximum age of cached HTML files. A value of 0 retains files until content updates trigger an automatic purge. Expired pages are automatically re-warmed by the preloader.
  • Never cache URLs: Provide URL paths or regex patterns (e.g. /my-custom-endpoint/.*) to permanently exclude from caching.
  • Query parameters:
    • Marketing tracking parameters (utm_*, gclid, fbclid) are ignored automatically, serving standard cached pages to campaign visitors.
    • Custom parameters listed under “Parameters to cache” receive their own distinct cache copies.
    • Any unlisted query parameter automatically bypasses the cache.
  • Cookie-based variants: Generate independent cache copies for specific cookie values (e.g. currency switchers or multi-currency WooCommerce extensions), with a safety limit of 50 variants per URL.

Under the Preload tab:

  • Sitemap preloading: Rapida automatically discovers your XML sitemap (supports Yoast, Rank Math, and native WordPress sitemaps). It crawls URLs in the background and populates the cache before visitors arrive.
  • Preload speed: Adjust the warming rate (e.g. 10 to 60 pages per minute) to match server CPU capabilities. On WooCommerce stores, preloading runs via Action Scheduler; on standard sites, it utilizes WP-Cron.
  • Re-warm on purge: After a full cache clear, pages that were previously cached are given top priority in the warming queue.
  • Hover prefetch & Speculation rules: Uses browser speculation rules (on modern Chromium browsers) or instant prefetch on link hover, loading the target document seconds before the user clicks.

Under the CSS & JS tab:

  • Minify CSS & JS: Strips comments, whitespace, and injects font-display: swap into CSS font declarations.
  • Remove unused CSS: Computes used selectors for each page template. Critical CSS is inlined directly into <head>, while the complete stylesheet loads asynchronously without blocking initial render.
  • Defer JavaScript: Defers scripts to unblock the main thread while wrapping inline jQuery snippets so they execute safely once jQuery loads.
  • Delay JavaScript: Delays heavy marketing and analytics scripts until the user moves the mouse, scrolls, or touches the screen. Built-in exclusions ensure essential site functions execute immediately.
  • Script manager: Located on the Scripts tab, this visual tool allows you to disable specific plugin stylesheets or scripts on specific post types, archives, or pages.

Under the Media tab:

  • Native lazy loading: Defers off-screen images and iframes. The first 3 images and the measured LCP element are automatically kept eager to protect Largest Contentful Paint.
  • YouTube preview replacement: Replaces embedded YouTube iframes with a lightweight static preview image, loading the heavy Google player only when clicked.
  • Automated WebP generation: Creates lightweight .webp copies of uploaded JPEG and PNG images. Can be processed in bulk via terminal:
Terminal window
wp rapida webp

Under the WooCommerce tab:

  • Automatic checkout protection: Cart, Checkout, and My Account pages are never cached.
  • Bypass on active session: Visitors with cart cookies or active checkout sessions bypass static caching automatically.
  • Empty cart optimization: Answers empty-cart fragment requests from a lightweight cached response to reduce server load.
  • Selective purge on stock changes: Adjusting product stock purges only the relevant product page and its direct category archive.