Proxy Cache Purge
This plugin does not install nor configure a cache proxy. It acts as an interface with such services. One common method of caching content for websites is via the use of reverse proxy caching. Common examples of this are Varnish and NGINX. These systems allow a website to update content and have the visitor’s experience cached without the need for complex plugins storing the files locally and using up a user’s disk space. A reverse proxy cache is installed in front of a server and reviews requests. If the page being requested is already cached, it delivers the cached content. Otherwise it generates the page and the cache on demand. The Proxy Cache Purge plugin sends a request to delete (aka flush) the cached data of a page or post every time it’s modified. How It Works When content on a site is updated by WordPress, the plugin reaches out to the proxy cache service with the URL of the page, requesting the cache be deleted. Not all pages are deleted from the cache on every change. For example, when a post, page, or custom post type is edited, or a new comment is added, only the following pages will purge: The front page The post/page edited Any categories, tags, and/or custom taxonomies associated with the page Related feeds Associated JSON API pages In addition, your entire cache will be deleted on the following actions: Changing themes Pressing the Empty Cache button on the toolbar Plugins can hook into the purge actions as well, to filter their own events to trigger a purge. On a multisite network using subfolders, only network admins can purge the main site. Keep Your Cache Warm Purging is only half the story. Once Proxy Cache Purge empties a page, the cache for that URL is gone, so the next visitor triggers a full uncached render and waits for it. On busy sites this “cache stampede” shows up as slow pages right after every update. Cacheability Pro is a companion plugin that closes that gap: it automatically re-warms purged URLs in the background so visitors keep hitting fast, cached responses, and it tunes your cache headers so more of your pages stay cacheable in the first place. Proxy Cache Purge handles invalidation; Cacheability Pro handles everything around it. Monitor Your Cache Proxy Cache Purge keeps your cache fresh, but how often is it actually being hit? If you run your own Varnish or NGINX server, GetPageSpeed Amplify shows your cache hit rate, request volume, and backend health over time, with a free tier. Proxy Cache Purge handles invalidation; Amplify shows you whether the cache is doing its job. Development Mode If you’re working on a site and need to turn off caching in one of two ways: Add define( 'VHP_DEVMODE', true ); to your wp-config.php file Go to Proxy Cache -> Settings and enable Debug Mode for 24 hours at a time That will break cache on page loads. It is not recommended for production! Cache Tags (BETA) As of version 5.4.0, Proxy Cache Purge includes an optional Cache Tags / Surrogate Keys purge mode. This feature is marked as BETA and is disabled by default. When enabled, the plugin: Adds cache-tag headers to WordPress responses (for example, tagging pages by post ID, post type, taxonomy terms, author, and archives). Uses tag-based purges instead of individual URL purges when content is updated, which can reduce purge traffic and improve consistency on complex sites. Requirements: A proxy cache that supports Cache Tags / Surrogate Keys and advertises this via standard Surrogate-Capability headers (for example, Surrogate-Capability: vhp="Surrogate/1.0 tags/1"). How to enable: Go to Proxy Cache → Settings → Purge Method and check “Use Cache Tags (Surrogate Keys)”. The checkbox is only enabled when your cache tells WordPress it supports tags (or when you explicitly enable it via a define). Alternatively, you can force-enable or force-disable detection via wp-config.php: define( ‘VHP_VARNISH_TAGS’, true ); // Force treat cache as tag-capable define( ‘VHP_VARNISH_TAGS’, false ); // Force treat cache as not tag-capable Because this feature depends on your cache configuration, it is recommended that you test it carefully in staging before enabling it on production. Background Purging with WP-Cron On busy sites, sending many PURGE requests directly from admin requests can slow things down. When you define DISABLE_WP_CRON as true in wp-config.php (because you are running a real system cron that calls wp-cron.php), Proxy Cache Purge automatically switches to an asynchronous mode: Purge requests (both URL-based and tag-based, when Cache Tags are enabled) are collected into a small per-site queue. The queue is processed by WP-Cron in the background, keeping your admin and content-editing actions responsive even when many URLs or tags must be invalidated. Object-cache purges (the “Purge Database Cache” option) remain synchronous and are not affected by this behaviour. The Proxy Cache settings page and Site Health integration expose basic queue status so you can verify that background purging is healthy; if the queue appears large or very old, check that your system cron is correctly invoking WordPress cron. Important: Cron Frequency and Cache Freshness When using background purging, the frequency of your system cron determines how quickly cache invalidations are processed. The longer the interval between cron runs, the longer visitors may see stale content after updates. For minimal stale content, run your system cron every minute: * * * * * /usr/bin/php /var/www/html/wp-cron.php If you can tolerate slightly longer delays, every 2-5 minutes is also acceptable. However, running cron less frequently (e.g., every 15 minutes) means cache purges may be delayed by that amount after content changes. Note: Scheduled posts are handled specially. When a scheduled post is published via WP-Cron, the cache is purged synchronously within the same cron run, ensuring immediate cache invalidation without waiting for the next cron execution. For detailed instructions on setting up a proper Linux-based WordPress cron, see: WordPress Cron Optimization. Disabling Background Purging If you have DISABLE_WP_CRON defined but do not want background purging (for example, on low-traffic sites where immediate purges are preferred), you can force-disable cron-based purging by adding this to your wp-config.php: define( 'VHP_DISABLE_CRON_PURGING', true ); With this constant set, all cache purges will execute immediately during the request, regardless of the DISABLE_WP_CRON setting. WP-CLI Purge Purge commands let you empty the cache. wp varnish purge – Flush the entire site cache (equivalent to clicking “Empty Cache” in admin) wp varnish purge --all – Explicitly flush the entire site cache wp varnish purge – Flush cache for a specific URL and all content below it (wildcard) wp varnish purge --url-only – Flush cache for only the exact URL specified (no wildcard) wp varnish purge --tag= – Flush cache by tag (requires Cache Tags mode to be enabled) Examples: wp varnish purge – Purge entire site wp varnish purge --all – Same as above, more explicit wp varnish purge https://example.com/hello-world/ – Purge this URL and everything below it wp varnish purge https://example.com/hello-world/ --url-only – Purge only this exact URL wp varnish purge https://example.com/wp-content/themes/ --wildcard – Purge all theme files wp varnish purge --tag=p-123 – Purge all pages tagged with post ID 123 wp varnish purge --tag=pt-post – Purge all cached pages of post type “post” Debug Debugging can help you figure out why your cache isn’t working as well as it could. The default is for your home page, but you can pass any URL on your domain. wp varnish debug [ ] Available parameters: [--include-headers] — Include headers in debug check output [--include-grep] — Grep active theme and plugin directories for common issues DevMode Development mode allows you to disable the cache, temporarily. wp varnish devmode [ ] – Change development mode state Async purge queue (cron-mode) When you define DISABLE_WP_CRON as true and run a real system cron for WordPress, Proxy Cache Purge can move heavy purge work into a small background queue that is processed by WP‑Cron. You can inspect and manage that queue via WP‑CLI: wp varnish queue status – show whether cron-mode is active, if a full purge is queued, counts of queued URLs/tags, and the last queue run time. wp varnish queue process – process any items currently in the queue (useful to run after deploys or cache‑sensitive operations). wp varnish queue clear – clear the queue without sending any PURGE requests. These commands do not replace your normal WordPress cron (you still need a cron entry that calls wp cron event run --due-now or hits wp-cron.php), but they give you a simple operational handle when using cron‑mode. Understanding Purge Behavior There are different types of cache purges, and they behave differently: Manual Purges (Admin Bar) “Purge Cache (All Pages)” – Sends a single regex purge request to invalidate the entire cache. Always executes immediately. “Purge Cache (this page)” – Purges only the exact URL you’re viewing. Always executes immediately. Manual purges are always immediate, even when background cron-mode is enabled. This is intentional: when you click a button, you expect immediate results. Automatic Purges (Post Save/Update) When you save or update a post, the plugin automatically purges: The post’s URL The homepage Category archive pages Tag archive pages Author archive page Date-based archives RSS feeds Related REST API endpoints This can be 20-50+ URLs depending on your site structure. When cron-mode is enabled, these automatic purges are queued and processed in the background to avoid slowing down the post editor. Key Difference Action URLs Purged Uses Cron Queue? “Purge Cache (All Pages)” 1 (regex) No – always immediate “Purge Cache (this page)” 1 No – always immediate Post save/update 20-50+ Yes (if cron-mode enabled) If you need to immediately purge all URLs related to a specific post (not just the post URL), save the post – the automatic purge will handle all related URLs.
Top keywords
- cache62×3.77%
- purge50×3.04%
- cron24×1.46%
- wp24×1.46%
- varnish21×1.28%
- post18×1.09%
- wp varnish17×1.03%
- proxy16×0.97%
- page15×0.91%
- proxy cache14×0.85%
- queue14×0.85%
- purges13×0.79%
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance
MORE THAN A CACHING PLUGIN WP-Optimize is trusted by more than 1 million WordPress website owners to boost performance and reduce page load times to improve your site’s user experiences and SERP rankings in Google. It does this in four clever ways: 1. It caches your site Caching is the process of storing a temporary HTML version of your site on the server so it can be retrieved more quickly for the user. It’s a sure-fire way to ensure web pages load at lightning-fast speed. Turn it on in just one click. 2. It compresses images Large images can really impact page speed load times. WP-Optimize makes it easy to identify and compress images to your preferred lossy / lossless settings in a couple of clicks. 3. It cleans the database Your WordPress database stores everything that you need, plus some things that you don’t. WP-Optimize cleans and optimizes the database to speed up your site and save server resources. 4. It minifies On top of its three main features, WP-Optimize Cache also has the more advanced minification feature. Together with caching, minification dramatically improves performance and page speed load time. 1. CACHE YOUR SITE Turn on caching in just one click: WP-Optimize automatically and optimally configures itself for your WordPress site. Turn it on in one-click or refine its settings if you prefer. More cache features: Cache preloading: This feature emulates a visit to your site, meaning cached files are served straight away, speeding up your site from the very first visit. GZIP Compression: When the server isn’t configured to do so, WP-Optimize delivers HTML, CSS and JS files to the user’s browser as smaller, compressed files, reducing the size of pages and style sheets by up to 90%! Preload key requests: Recommended by Google to improve page speed times. Critical resources (things like font files) get loaded first, so the page loads much faster [Premium]. Use cache settings to: Serve cached content to logged in users: Turn this on if content stays the same for logged in users (or turn on and exclude URLs where content does change e.g. my account areas). Exclude content from cache: Exclude by URL, conditional tags, browser agent strings or list cookies that should prevent caching when set (advanced user settings). Deliver device-specific cache: Serve separate cache files to desktop and mobile devices . This ensures that responsive features e.g. desktop and mobile menus are cached separately and served correctly. User per role cache: Useful if your website delivers different content to different user roles. e.g. an e-commerce site that displays different content to resellers or consumers [Premium]. User specific cache: Serves separate cache files to individual users. Useful for websites with personalised content e.g. Learning management systems [Premium]. Cache purging permissions: Select which user roles are allowed to purge the cache e.g. admin only or perhaps a ‘teacher’ role in an LMS setting only [Premium]. 2. COMPRESS IMAGES Lossy or lossless compression options: Choose between maximum space saving, best image quality or somewhere in-between. WebP conversion: Recommended by Google, WebP can achieve up to 34% smaller file sizes compared to JPEG and up to 26% compared to PNG. Auto-compress: Check a box and every new image you upload will automatically be compressed to your preferred lossy / lossless settings. Bulk compression: Compress every existing image on your site with the press of a button. Restore original: Gone too far? Revert images back to their original in one click. Retain EXIF image data: Check a box to retain EXIF image data during compression. Lazy Load: Webpages load much faster by loading web parts gradually, when they’re needed vs simultaneous loading of everything, all at once [Premium]. Delete orphaned images: Identify and delete unused images from your WordPress website, saving disk space [Premium]. Delete unused image sizes: WordPress creates multiple sizes for every uploaded image causing the uploads folder to become bloated. Scan for image sizes not in use and remove them to save further disk space [Premium]. 3. CLEAN AND OPTIMIZE THE DATABASE Cleans-up database tables, post revisions, auto draft posts, trashed posts, spam, trashed comments and more. Choose what to optimize or it’s one click to clean out the lot. Schedule clean-ups: So you can set and forget. Choose from daily, weekly, fortnightly or monthly. Flexible clean-up schedules: You may wish to optimize database tables more frequently than you remove unapproved comments (for example). Choose the specific time and day when tasks should run [Premium]. Retain a set number of weeks’ data during clean-ups: Just in case you need to retrieve something. Back up before clean-ups: If you delete something you shouldn’t, restore it in a couple of clicks with UpdraftPlus. Power tweak – Turbo boost for WooCommerce: Unique to WP-Optimize, this power tweak boosts performance by replacing a slow query in WooCommerce with two much more efficient queries. E-commerce sites transacting high numbers of orders stand to gain here [Premium]. Power tweak – Boost performance by indexing the postmeta table: This unique power tweak works by allowing the WordPress postmeta table to be indexed, improving performance [Premium]. 4. MINIFY AND COMBINE HTML, CSS AND JAVASCRIPT Minify in just one click: Minifies HTML, JavaScript and CSS. Toggle on or off or customise each one under ‘settings’. Customise minification: Minify only (removing unnecessary code e.g line breaks and white spacing) or minify and merge. Apply the same or different settings to HTML, CSS and JavaScript. Asynchronous loading: Choose non-critical CSS and JavaScript files to load in the background and independently of other resources e.g. analytics or pixel scripts. Loading asynchronously eliminates render blocking and improves page speed. Exclude files from being minified: Specify CSS and JavaScript files to exclude from minification. Optimize fonts: Optimize Font Awesome and Google Fonts. Inline the font files, inherit from CSS settings or load CSS / Javascript asynchronously instead. Preload assets: WP-Optimize visits each web page on your site so the code is minified and preloaded for real life users, right from their very first visit. Preload key requests: Recommended by Google to improve page speed times. Critical resources (things like font files) get loaded first, so the page loads much faster. WHY WP-OPTIMIZE? It’s brought to you by TeamUpdraft, the team behind the world’s most trusted backup, migration and restoration plugin. It’s easy to use. It packs a punch for a free plugin. WP-Optimize brings the best cache and optimization technology together into one single, seamless plugin to make your WordPress site fast, lean and efficient. PREMIUM FEATURES AT A GLANCE Our free version of WP-Optimize Cache is great, but we also have an even more powerful Premium version with extra features that offer the ultimate in freedom and flexibility: Multisite Support: extends database optimisations so they function for multiple WordPress sites at a time. If you manage more than one website, you will need WP-Optimize Cache Premium. Flexibility and Control: gives you the power to optimize select individual tables or a particular combination of tables on one or more WordPress websites, rather than having to optimize all database tables. Deleting unused and unwanted images: removes orphaned images from your WordPress site, plus images of a certain, pre-defined size. Sophisticated Scheduling: offers a wide range of options for scheduling automatic optimization. Specify an exact time and run clean-ups daily, weekly, fortnightly or monthly and perform any number of additional once off optimizations. Seamless Graphical User Interface: for superb clarity in scheduling and managing of multi-site optimizations. WP-CLI support: provides a way to manage optimizations from command-line interface if you have lots of sites Lazy Loading: load only the images and part of a web-page when it is visible to the user so they can see something very quickly. Optimization Preview: gives users the ability to preview, select and remove data and records available for optimization from the database. Preload key requests: preload assets such as web fonts and icon fonts, as recommended by Google PageSpeed Insights. Premium support – caching is one of the most complex things you can do for a website, so premium support offers you peace of mind there’s someone to talk quickly to if you need any technical answers or help configuring the optimizations of cache settings for your website. Translations Translators are welcome to contribute to the plugin. Please use the WordPress translation website.