Unload Scripts and CSS in 1 click to speed up WordPress [Quick Guide]

7:10 pm January 11, 201710093

the speed of your WordPress can be affected in many ways, there are many factors that can affect it. Among these, we can without a doubt say that more your site load scripts and CSS, more it time to load . QED! Most of these files will be heavy and more your site will load slowly. Now imagine what happens when you install dozens of themes and plugins where everyone grows its own scripts and styles.

In a perfect world, all the plugins and themes would be light and coded correctly. Files would be responsible only if they were needed, and he would never conflict between themes and plugins. This is currently not the case :/ Even if you are not a developer, you have probably experienced at least once JS and CSS errors on your WordPress.

Sometimes, simply do not load the scripts and unnecessary styles, effectively accelerating your site. The problem for a beginner without coding experience is: how to find files not loading and especially how?

With WP Asset CleanUp , the problem no longer arises.

WP Asset CleanUp

unnecessary CSS and scripts?

Before I introduce the plugin and its possibility in detail, back first on the scripts and CSS files. Whenever you install a plugin or a theme, the latter arrives with style files and scripts to make it work .

For example, a plugin such as Social Warfare that allows me to manage the social sharing buttons. Ce dernier charge, à lui tout seul, sur chacune de mes pages les éléments suivants :

  • /wp-content/plugins/social-warfare/css/style.css
  • /wp-content/plugins/social-warfare/js/script.js

Soyons précis, ces fichiers sont absolument nécessaires pour son bon fonctionnement. However, I use the social on my articles and never buttons on my pages. Well I got the plugin so that it displayed on the articles, and yet the CSS and Js files were also loaded on all of my pages!

Here is the example type of files that I would like to unload my pages! 2 queries and less weight, it’s always good to take!

Another example with my theme, it offers Shortcodes and is very handy. Yet once I don’t not use them on my homepage, why should I load CSS and Js files that will impact and degrade the performance of my home?

Now imagine what must load your plugins and themes and you ask if it is really necessary that their CSS and Js are loaded everywhere , on all your content?

chargement css JS

WP Asset CleanUp

WP Asset CleanUp scans your page and detects all files that are loaded. All you have to do when editing a page or an article is to select those you do NOT want to load.

The benefits to unload unnecessary CSS and Scripts:

  • get a minimum number of HTTP requests
  • reduce the HTML code of the page
  • make the easier source code to analyze
  • delete conflicts between plugins and themes
  • get a better score on the tests of speed
  • online

  • better rank on Google thanks to a faster site
  • limit the writing of logs on the server
ATTENTION: before using WP Asset CleanUP, I recommend doing a backup your WordPress and know how to restore. WPF cannot be held responsible for misuse of this plugin.

nothing on the home page of WP training, I could unload not less than 5 scripts Js and CSS 3 styles . What gives currently 41 queries instead of 49 and a weight of 644 kB instead of 698 kB, or a gain of 44 kB in a few clicks and an increase in the performance of the site.

I also put in place comprehensive rules on all my pages, as for example do not load the CSS and Js plugin reviews Mention how’s Authors and many others…

chargement WPF

use WP Asset CleanUp in Front or Back

even without checking the parameters of the plugin, you can already start working on the optimization of your site from the backend. To see all the scripts and styles that load whenever you open a post or a page (including home page) on your site, you just edit and scroller everything down to see the WP Asset CleanUp cartridge.

If you have a lot of plugins, you may be very surprised of the number of files ^^

the setting below allows you to display directly in front, when you are connected, the scripts and styles that load on each page or in each section of your WordPress.

wp asset 1

start unloading

now that you have gone through the settings, it’s time to delete unnecessary files. The plugin shows with a exclamation icon the core WordPress files.

In most cases, it is not useful to unload these files, it is simpler and less dangerous to ignore and avoid errors. Before unload one of the core files, make sure you really know what you are doing.

To unload a file , simply check the box to check overall (all on the left) and/or to add exceptions (internal checkboxes).

wp asset 2

Each file found by WP Asset CleanUp will have its link source, my version (if available) and WP Asset will also show you the file which it depends. For each of these files, you will be able to:

  • unload everywhere,
  • unload on all pages of this particular type of post,
  • load only on this page.

As you can see, I can, for example, to disable some Js and CSS on every page and however add an exception for one or more pages.  Anyway, is on the map and it is roughly good 😉

WP asset

the global rules to save time

If you decide to keep and use WP Asset CleanUp, it is important to know that you won’t have to (re) search the global rules that you already created. Indeed, after a while it is hard to remember all the rules in place. Instead, simply you visit WP Asset CleanUp > Global Rules where you can find all of the previously created comprehensive rules. So, if you need to load/unload a script or a style in particular, you won’t have to search through each of your articles or pages.

wp asset 3

manage scripts and styles of home page

clearly is the part that I was most interested, be able to choose what load or not on my home. Always on the menu WP Asset CleanUp > Home Page , you will find direct links and you’ll be able to load or unload scripts and styles as you did for your articles and your pages.

wp asset 4


in the end, we are always looking for ways to optimize the performance of our WordPress sites. If we already knew plugins from cache and optimizing images, being able to unload some files simply, on a case-by-case basis or globally, is a real plus for performance .

The plugin is intuitive, powerful and it’s free! attention however, you should use it with caution. Unload scripts and styles, before you know why you do and have a backup in the proper manner.

I particularly liked this plugin and it is in place on WPFormation for this article. I unloaded some CSS and Js on the pages of my site and put in place some global rules for items in a few minutes only, the performance gain is here!

Did you know this plugin? You have an alternative?
Tell us in the comments!