When we talk about WordPress performance, this issue comes up quite often. Our CSS and JavaScript files normally have the file version on the end of their URLs, such as domain.com/style.css?ver=1.0.

Some web servers are unable to cache query strings, even if a header is present. So the solution to avoid web server cache issues is removing the version from the URL. This will fix that warnings that you see in Pingdom and GTMetrix called “Remove query strings from static resources.”

Add the code below on your functions.php.