Cache Busting Static Files: Version Query Strings and Hashes
Force updates.
Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Cache busting makes browsers download a new copy of a CSS, JavaScript or image file after you change it, while still caching it for a long time when it has not changed.
Step 1: Why it matters

With long cache times, visitors keep seeing old files until the address changes.
Step 2: Use a version number

Add ?v=2 to file links. Change the number when you edit the file.
Step 3: Use file modification time

In PHP use filemtime() to create the version automatically.
Step 4: Use hashed file names

Build tools create names like app.3f9a1c.js. The name changes only when content changes.
Step 5: In WordPress

Enqueue scripts and styles with a version argument.
Step 6: Check CDN handling

Some CDNs ignore query strings. Enable it or use hashes.
Step 7: Test

Edit, reload and confirm the new file loads.
Still stuck?
If these steps do not solve it, we fix it for you for a flat $99. Full refund if we do not solve it within 7 days.
Related guides
- WordPress: Remove Query Strings From Static Resources: Pros and Cons
- WordPress Plugin Bloat: How Many Plugins Are Too Many?
- WordPress: Optimize Images in Bulk Without Changing URLs
- WordPress: Delete Expired Transients Safely
Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.