WP Remove Query Strings From Static Resources
WP Remove Query Strings From Static Resources is a lightweight, zero-configuration WordPress plugin that automatically removes query strings (like ?ver=6.6 ) from your local CSS and JavaScript file URLs. It intelligently ignores external resources (such as third-party APIs like Google Maps) to preve
WP Remove Query Strings From Static Resources is a lightweight, zero-configuration WordPress plugin that automatically removes query strings (like ?ver=6.6 ) from your local CSS and JavaScript file URLs. It intelligently ignores external resources (such as third-party APIs like Google Maps) to prevent breaking their functionality, and features strict extension checking to protect dynamic scripts.
By default, WordPress appends version parameters to static resource URLs — for example:
https://example.com/style.css?ver=6.6
While this helps with cache-busting during development, it prevents proxy servers and CDN networks from properly caching these files, which hurts your website’s performance score.
This plugin strips those query strings, turning URLs like:
https://example.com/style.css?ver=6.6
into clean, cacheable URLs like:
https://example.com/style.css
Why Does This Matter?
Speed is a critical ranking factor for search engines. Tools like Google PageSpeed Insights , GTmetrix , Pingdom , and YSlow flag query strings on static resources as a performance issue. Removing them can:
- ✅ Improve your website performance score
- ✅ Enable better proxy and CDN caching
- ✅ Reduce page load time for returning visitors
- ✅ Contribute to better SEO rankings
- ✅ Improve overall user experience
How It Works
Once activated, the plugin hooks into WordPress’s built-in script_loader_src and style_loader_src filters and silently removes all query string parameters from your local CSS and JS URLs — on the frontend only. The WordPress admin dashboard is never affected.
No setup required. No settings page. Just install, activate, and you’re done.
Features
- Removes all query string parameters from local CSS and JS URLs (not just ?ver )
- Safely ignores external resources to avoid breaking third-party scripts and APIs
- Strictly targets files ending in .css and .js to protect dynamic PHP scripts enqueued as styles/scripts