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 can Users Filter Posts and Pages in WordPress - May 19, 2017
- How to get started with PHP for WordPress Development - May 14, 2017
- How to Import Articles from Google Docs to your WordPress Blog - May 13, 2017