More

    How to minify your WordPress site files and make it faster 2020

    When working at the speed of a website, try to save milliseconds from everything possible. This is why I recommend you to minify your WordPress site files.

    Getting a fast and performing site is a complex activity made up of many practices. First you have to choose a top quality hosting.

    Then you will have to optimize your images, even using more advanced techniques such as lazy loading.

    You will also need to carefully choose the plugins you use and not overdo the installations, always evaluating if the functionality you are looking for is not already available within the native WordPress functions.

    We can therefore say that, to speed up WordPress, we must make sure to eliminate all the superfluous, and avoid unnecessary data being downloaded.

    Minify WordPress files allows you to get rid of some unnecessary data. Let’s see what it is.

    What does it mean to minify files

    WordPress and plugins are written in various programming languages. There are PHP files, with HTML code inside them, then there are CSS files, and finally you also find JavaScript files for some functionality.

    When a programmer develops code, he must necessarily keep his files in order in order to understand what function each part of the file performs and to avoid making mistakes that compromise its functioning.

    For this reason, the files will be full of spaces, carriage returns, indentations and comments.

    All these elements are not necessary for the program to work properly. And here we can try to minify WordPress files.

    By eliminating spaces, comments, empty lines, the size of the files will be reduced, without compromising in any way the correct functioning of the plugin or function. This is usually a few kilobytes, but if your site contains a lot of files, you may notice some difference in performance.

    Also, the browser will interpret the code faster, as it will no longer encounter strings which then have to be ignored.

    File compression alone will certainly not make your site lightning fast but, used in conjunction with all the other optimization practices, it will do its part.

    Let’s take a CSS file for example. Here’s what it will look like as it is released by the developer.

    Extended CSS

    If we apply minification, the result will be very different. As you can see, you will get a “wall” of code, much more difficult for humans to interpret, but much simpler for a machine.

    Minifed CSS

    According to a Google test, optimizing your files this way could save you as much as 63% of the file size by turning a 406-character code into just 150.

    How do you minify a WordPress

    Are you wondering if you will now have to go and delete all spaces and comments within WordPress files? Don’t worry, you won’t have to do anything like this!

    If you use a plugin like WP Rocket or W3 Total Cache, you can take advantage of their features.

    WP Rocket and W3 Total Cache file minification

    With WP Rocket, enter the section File optimization of the WP Rocket dashboard, you will find the entries Minify HTML, Minify CSS files, Minify JavaScript files.

    Make sure all three are active.

    Minify files with WP Rocket

    If you use W3 Total Cache instead, enter the section Performance> Minify. Check the box Enable to the voices HTML minify settings, JS minify settings, CSS minify settings.

    In the HTML section, you can also minify the inline JS and CSS codes, i.e. those that appear directly within the HTML and not on external files.

    For all three items, you can choose to also delete the carriage returns (Line break removal).

    If there are any files or pages that you prefer to keep with the extended code, specify their path (relative, that is, without within the section Advanced.

    Minify files with W3 Total Cache

    Minify the codes manually

    While this will probably never happen to you in your entire life, it may be complicated or impossible to minify your files using such a plugin, for example, if they are part of other domains.

    In this case, you could manually compress your files and upload them directly to the already optimized web space.

    There are online services such as Minify Code which allows you to paste a code and get it fully minified.

    The instrument HTML Compressor it also allows you to directly upload the file and download it already optimized.

    Access the TUTTO SEO ™ Group

    Conclusion

    Working on the speed of your site, as you can see, concerns many aspects. I suggest you don’t miss a single one if you want to make sure your pages are really light.

    Did you already know the ability to minify WordPress files?

    Do you know of other tools that can help you do this?

    All clear? If you have any questions, as always, leave us a comment below.

    Latest articles

    ▷3 options to develop a web application without breaking the bank 2020

    Developing a web application can be expensive, even very expensive. Do you want to develop your web application without breaking the bank: mobile...

    ▷Instagram reels: positive and negative

    How is Reels; It allows us to share short videos (up to 15 seconds) on Instagram. It will replace the Stories; We'll see! However, with...

    free WordPress theme ideal for showcase site and blog 2020

    If you are looking for a free theme for your website, find out if the Astra theme for WordPress is the ideal one for...

    ▷Aqua Ray – The opinion of Websites Are Us on this web host 2020

    Our dependence on the American web giants, the GAFAMs (Google, Apple, Facebook, Amazon and Microsoft) is growing. The Covid-19 crisis once again illustrates...

    Related articles

    Leave a reply

    Please enter your comment!
    Please enter your name here