{"id":397773,"date":"2026-12-02T08:51:52","date_gmt":"2026-12-02T08:51:52","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ceres-auto-cache-busting-for-css-and-js\/"},"modified":"2026-12-02T09:39:39","modified_gmt":"2026-12-02T09:39:39","slug":"pragma-auto-cache-busting-for-css-js","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/pragma-auto-cache-busting-for-css-js\/","author":23542431,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.5","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Pragma Auto Cache Busting for CSS and JS","header_author":"Pragma Softwares","header_description":"Gives every local CSS and JS file a version based on the file itself, so visitors get the new file as soon as it changes, with a one-click refresh in the admin bar.","last_updated":"2026-12-02 09:39:39","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/www.pragmasoftwares.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":126,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"pragmasoftwares","date":"2026-12-02 09:39:39","revision":3839573}},"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3839450,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3839450,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3839450,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3839450,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3839450,"resolution":"1","location":"assets","locale":"","width":1098,"height":1297},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3839450,"resolution":"2","location":"assets","locale":"","width":1098,"height":2187},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3839586,"resolution":"3","location":"assets","locale":"","width":1098,"height":1191}},"screenshots":{"1":"Settings: switch file types and image versioning on or off, choose how versions are worked out, see which page caches will be cleared, and refresh every version in one click.","2":"Exclusions: leave out post types, themes, plugins, specific files, or single pages, with bulk import and export.","3":"Check a page: every CSS and JS file on a page, with the version each one ends up with."}},"plugin_section":[],"plugin_tags":[146,63430,356,229,247],"plugin_category":[52,54,59],"plugin_contributors":[279003],"plugin_business_model":[],"class_list":["post-397773","plugin","type-plugin","status-publish","hentry","plugin_tags-cache","plugin_tags-cache-busting","plugin_tags-css","plugin_tags-javascript","plugin_tags-performance","plugin_category-performance","plugin_category-security-and-spam-protection","plugin_category-utilities-and-tools","plugin_contributors-pragmasoftwares","plugin_committers-pragmasoftwares"],"banners":{"banner":"https:\/\/ps.w.org\/pragma-auto-cache-busting-for-css-js\/assets\/banner-772x250.png?rev=3839450","banner_2x":"https:\/\/ps.w.org\/pragma-auto-cache-busting-for-css-js\/assets\/banner-1544x500.png?rev=3839450","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/pragma-auto-cache-busting-for-css-js\/assets\/icon-128x128.png?rev=3839450","icon_2x":"https:\/\/ps.w.org\/pragma-auto-cache-busting-for-css-js\/assets\/icon-256x256.png?rev=3839450","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/pragma-auto-cache-busting-for-css-js\/assets\/screenshot-1.png?rev=3839450","caption":"Settings: switch file types and image versioning on or off, choose how versions are worked out, see which page caches will be cleared, and refresh every version in one click."},{"src":"https:\/\/ps.w.org\/pragma-auto-cache-busting-for-css-js\/assets\/screenshot-2.png?rev=3839450","caption":"Exclusions: leave out post types, themes, plugins, specific files, or single pages, with bulk import and export."},{"src":"https:\/\/ps.w.org\/pragma-auto-cache-busting-for-css-js\/assets\/screenshot-3.png?rev=3839586","caption":"Check a page: every CSS and JS file on a page, with the version each one ends up with."}],"raw_content":"<!--section=description-->\n<p>You update a stylesheet, save it, and reload the page, but the site looks exactly the same as before. A little later your client writes in to say they still cannot see the change. The usual answer is \"kindly clear your browser cache\", which does work, but it also wipes everything else the browser has saved, often signs people out of other sites, and is simply not something you can ask every visitor to do.<\/p>\n\n<p>This happens because browsers keep a copy of CSS and JS files so that pages load quickly on the next visit. WordPress adds a <code>?ver=<\/code> number to each file, so that browsers know when to fetch a new copy, but that number generally changes only when a theme or plugin releases a new version. The small, everyday edits made in between keep the same number, so browsers carry on showing the old file.<\/p>\n\n<p>This plugin takes care of that at the source. It replaces the number with a short code worked out from the file itself, its last-modified time and size. Whenever a file changes, its version changes along with it, so every browser fetches the new file on the next page load, with nobody needing to clear anything. Files that have not changed keep their version, so visitors keep using their cached copy, and the site stays as fast as before.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Automatic, file-based versions for every local CSS and JS file, including JavaScript modules (WordPress 6.5 and above), with no setup needed.<\/li>\n<li>A <strong>Refresh CSS\/JS versions now<\/strong> option in the admin bar, for administrators, to give every file a new version at once, for example right after a deployment. It works in place, with no page reload.<\/li>\n<li><strong>Page cache clearing on refresh<\/strong>: when you refresh, the plugin also clears your page cache, so visitors get the new versions straight away. Supported: WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, WP Fastest Cache, WP-Optimize, SiteGround Speed Optimizer, Breeze, Nginx Helper, Cache Enabler, Hummingbird, Proxy Cache Purge, SpinupWP, WP Engine, Kinsta, and Cloudflare through its official plugin. Everyday file changes never clear your page cache.<\/li>\n<li>Optional versions for <strong>media library images<\/strong>, so an image replaced under the same file name shows up straight away. Off by default.<\/li>\n<li>Choose whether to apply it to CSS, JS, or both, and whether to also apply it inside wp-admin.<\/li>\n<li>Versions based on the file's modified time (fastest), or on its contents, for sites whose deployments re-upload every file.<\/li>\n<li>A dedicated <strong>Exclusions<\/strong> screen to leave out:\n\n<ul>\n<li>single pages, posts, or custom post type entries, with search to add and bulk remove, kept in sync with an \"Exclude this page\" box on each edit screen,<\/li>\n<li>many entries at once, by pasting a list of page addresses, slugs, or IDs, or choosing a .txt or .csv file, with an export of the current list in the same format,<\/li>\n<li>an entire post type, its entries and archive,<\/li>\n<li>any active plugin or installed theme,<\/li>\n<li>individual scripts or styles by handle, or files by path pattern, such as <code>*\/vendor\/*<\/code>.<\/li>\n<\/ul><\/li>\n<li><strong>Check a page<\/strong>: pick any page of your site and see every CSS and JS file on it, with the version each one ends up with.<\/li>\n<li>WP-CLI commands, <code>wp cache-busting refresh<\/code> and <code>wp cache-busting status<\/code>, for deployment scripts.<\/li>\n<li>Keep the standard <code>ver<\/code> parameter name, or use your own, such as <code>v<\/code>, with a live preview.<\/li>\n<li>A Site Health check, plus a note on the settings screen, whenever another plugin that changes or removes file versions is also active.<\/li>\n<li>Works on multisite, with settings kept separately for each site.<\/li>\n<\/ul>\n\n<h4>What it leaves alone<\/h4>\n\n<ul>\n<li>WordPress core files, which already change version on every WordPress update.<\/li>\n<li>Files served from other domains, such as CDNs or third-party services.<\/li>\n<li>Files that were deliberately registered without a version.<\/li>\n<\/ul>\n\n<h4>Safe by design<\/h4>\n\n<p>The plugin only uses the standard <code>script_loader_src<\/code>, <code>style_loader_src<\/code> and <code>script_module_loader_src<\/code> filters, and does not replace any of WordPress's own objects. If anything unexpected comes up for a particular file, for example another plugin passing something that is not a URL, that file simply keeps its original version. It is written so that it cannot take your site down.<\/p>\n\n<h4>Privacy<\/h4>\n\n<p>The plugin itself makes no external HTTP requests and does not collect or store any personal data.<\/p>\n\n<p>When you click Refresh with page cache clearing switched on, the plugin asks the caching plugin or host you already use to clear its cache, in the same way that plugin's own \"clear cache\" button does. Some of those may contact their own service when clearing, for example the Cloudflare plugin contacting Cloudflare, or Proxy Cache Purge sending a purge request to your proxy server. Page cache clearing can be switched off in the settings.<\/p>\n\n<h4>For developers<\/h4>\n\n<ul>\n<li><code>pragma_acb_skip<\/code> (filter): return <code>true<\/code> to skip a specific asset. Arguments: <code>$skip<\/code>, <code>$handle<\/code>, <code>$src<\/code>.<\/li>\n<li><code>pragma_acb_version<\/code> (filter): adjust the final version string. Arguments: <code>$version<\/code>, <code>$handle<\/code>, <code>$file_path<\/code>.<\/li>\n<li><code>pragma_acb_after_refresh<\/code> (action): runs after a manual refresh, for example to clear a cache the plugin does not support. Argument: <code>$cleared<\/code>, the names of the caches the plugin already cleared.<\/li>\n<li><code>pragma_acb_integrations<\/code> (filter): add your own page cache integration, an object extending <code>Pragma\\AutoCacheBusting\\Integrations\\Integration<\/code>.<\/li>\n<li><code>pragma_acb_post_types<\/code> (filter): change which post types get the \"Exclude this page\" box.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin through the \"Plugins\" screen in WordPress, or upload the plugin folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>That is all, versions are handled automatically from activation onwards.<\/li>\n<li>Optionally, visit <strong>Cache Busting<\/strong> in the admin menu to adjust what it applies to, set up exclusions, or check a page.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"i%20refreshed%20the%20versions%2C%20but%20visitors%20still%20see%20the%20old%20file.%20why%3F\"><h3>I refreshed the versions, but visitors still see the old file. Why?<\/h3><\/dt>\n<dd><p>If your site uses a page cache, the cached pages still contain the old file links until that cache is cleared. When your caching plugin or host is one of the supported ones, the plugin clears it for you on every refresh, and the settings screen shows which ones it found. For any other cache or CDN, kindly clear it after refreshing.<\/p><\/dd>\n<dt id=\"does%20this%20slow%20my%20site%20down%3F\"><h3>Does this slow my site down?<\/h3><\/dt>\n<dd><p>No, not in any way you would notice. By default it only checks each file's modified time and size, which is very quick, and does not read the contents of your files. With <strong>Version based on: File contents<\/strong>, a file is read once after it changes and the result is remembered, so normal page loads stay just as quick.<\/p><\/dd>\n<dt id=\"should%20i%20change%20the%20parameter%20name%20from%20%22ver%22%3F\"><h3>Should I change the parameter name from \"ver\"?<\/h3><\/dt>\n<dd><p>We would generally recommend keeping <code>ver<\/code>, since it is the name WordPress itself uses, and some optimisation plugins and CDN rules look for it. If you do change it, the <code>ver<\/code> parameter is removed so a file URL never carries both.<\/p><\/dd>\n<dt id=\"how%20do%20i%20stop%20a%20particular%20page%20from%20being%20versioned%3F\"><h3>How do I stop a particular page from being versioned?<\/h3><\/dt>\n<dd><p>Either open it in the editor and switch on <strong>Exclude this page<\/strong> in the Pragma Cache Busting box, or go to <strong>Cache Busting \u2192 Exclusions<\/strong> and search for it there. Both places stay in sync. To leave out every entry of a post type, switch that post type on in the same screen.<\/p><\/dd>\n<dt id=\"can%20i%20exclude%20many%20pages%20at%20once%2C%20or%20copy%20the%20list%20to%20another%20site%3F\"><h3>Can I exclude many pages at once, or copy the list to another site?<\/h3><\/dt>\n<dd><p>Yes. Under <strong>Cache Busting \u2192 Exclusions \u2192 Pages and posts<\/strong>, open <strong>Bulk import<\/strong> and paste one page address, slug, or ID per line, or choose a .txt or .csv file. <strong>Export list<\/strong> downloads the current list in the same format, so it can be imported on another site, as long as the pages there have the same addresses or slugs.<\/p><\/dd>\n<dt id=\"every%20file%20gets%20a%20new%20version%20after%20each%20deployment%2C%20even%20unchanged%20ones.%20why%3F\"><h3>Every file gets a new version after each deployment, even unchanged ones. Why?<\/h3><\/dt>\n<dd><p>Some deployment methods, such as Git, rsync, or FTP uploads, re-upload every file, which changes every file's modified time. Kindly switch <strong>Version based on<\/strong> to <strong>File contents<\/strong> in the settings, and only files whose contents actually changed will get a new version.<\/p><\/dd>\n<dt id=\"can%20i%20refresh%20versions%20from%20a%20deployment%20script%3F\"><h3>Can I refresh versions from a deployment script?<\/h3><\/dt>\n<dd><p>Yes. Run <code>wp cache-busting refresh<\/code> with WP-CLI. On multisite, add <code>--url=<\/code> with the site address to target one site.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20caching%20and%20optimisation%20plugins%3F\"><h3>Does it work with caching and optimisation plugins?<\/h3><\/dt>\n<dd><p>Yes. Supported page caches are cleared automatically when you refresh, as explained above, and everyday file changes never touch your page cache. Plugins that combine and minify CSS and JS, such as Autoptimize, give their combined files a name based on the content, so changes still show up, and the plugin keeps versioning every file they leave as it is.<\/p><\/dd>\n<dt id=\"can%20it%20version%20images%20too%3F\"><h3>Can it version images too?<\/h3><\/dt>\n<dd><p>Yes, if you switch on <strong>Also version images from the media library<\/strong>. This helps when you replace an image but keep its file name, since browsers would otherwise keep showing the old one. It covers featured images, galleries, srcset and images in post content, only on the front end, so the editor never saves a versioned address. If your images are served by an offload or CDN plugin, kindly test it on your site first.<\/p><\/dd>\n<dt id=\"does%20running%20wp-cli%20clear%20my%20page%20cache%20too%3F\"><h3>Does running WP-CLI clear my page cache too?<\/h3><\/dt>\n<dd><p>Yes, <code>wp cache-busting refresh<\/code> clears supported page caches as well; add <code>--skip-cache-purge<\/code> to leave them alone. For file-based caches, kindly run WP-CLI as the same system user as your web server, otherwise it may not have permission to delete the cached files.<\/p><\/dd>\n<dt id=\"can%20i%20use%20this%20together%20with%20another%20asset%20versioning%20or%20%22remove%20query%20strings%22%20plugin%3F\"><h3>Can I use this together with another asset versioning or \"remove query strings\" plugin?<\/h3><\/dt>\n<dd><p>Nothing breaks, but it is not recommended. Another versioning plugin would be doing the same job, and \"remove query strings\" plugins strip the version from file URLs, which cancels this plugin out. The settings screen shows a note whenever one of these is active.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20my%20settings%20if%20i%20uninstall%20the%20plugin%3F\"><h3>What happens to my settings if I uninstall the plugin?<\/h3><\/dt>\n<dd><p>By default, nothing. Deleting the plugin leaves your settings in place, so reinstalling it brings everything back as it was. If you would genuinely like everything removed, kindly tick <strong>Delete all plugin data on uninstall<\/strong> on the settings screen first.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Gives every local CSS and JS file a version based on the file itself, so visitors get your changes straight away.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/397773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=397773"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pragmasoftwares"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=397773"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=397773"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=397773"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=397773"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=397773"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=397773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}