When Do You Need to minify the files?
Minify is a programming term that basically means to remove unnecessary characters that are not needed for the code to execute. Minifying your code speeds up your page loading, making visitors and search engines happy. It achieves this goal by removing white spaces, lines, and unnecessary characters from the source code.
The obvious advantage of minifying files is improved WordPress speed and performance. Compact files are faster to load and improve your site’s speed.
However, some experts believe that the performance improvement is very small for most websites and not worth the trouble. The minification only decreases few kilobytes of data on most WordPress sites. You can reduce more pageload time by simply optimizing images for web.
Here is an example of a CSS code:
After minifying the code it will look like this:
The first thing you need to do is install and activate the Better WordPress Minify plugin.This plugin uses the PHP library Minify and relies on WordPress’s enqueueing system rather than the output buffer, which respects the order of CSS and JS files as well as their dependencies.
Upon activation, the plugin will add a new menu item labeled ‘BWP Minify’ to your WordPress admin bar. Clicking on it will take you to plugin’s settings page.
You can now click on the Save Changes button to store your settings.
There are many other advanced options on this page. The default settings will work for most websites, but you can review and change these options on a case by case basis.
Next, you need to head over to your website. Right click anywhere and then select ‘View Page Source’ from the browser menu.
Latest posts by sarah ali (see all)
- How to Get Started with A/B Testing for WordPress - June 23, 2017
- Top 5 CDN Providers for WordPress: 2017 - June 22, 2017
- How to Create an Admin User in WordPress Database via MySQL. - June 20, 2017