How To Compress Images and Minify WordPress Theme Files

WordPress is a popular blogging platform and has quite a few standard php files that come as default with every wordpress theme, for various parts of the theme like Header, Single Post Page, Archive, Sidebar etc., which are frequently called from various pages.wp-theme-minify-results

wp-theme-minify

Images used in theme also consume bandwidth if not properly compressed which leads to slower load time of pages, Caching helps lower the load time but minifying files with code like the php files and compressing the images in the themes makes it even smaller in size helping improve load time of webpages.

GZip compression helps reduce bandwidth compression, [ Check If Your WebPages are Compressed Using GZIP Compression].

WP Plugins that help improve Blog Loading Time –

Theme Minifier is wordpress plugin that can automatically minify HTML markup, CSS, and Javascript in wordpress theme files and also compress the images in the wordpress theme files which helps reduces bandwidth and lower page loading time.

CSS Compression is done using CSSTidy an open source CSS parser and optimizer and Minify is done using either JSMin or Packer, either of which can be selected from the settings page.

The plugin creates a new theme from the original theme folder Creates copy of theme, leaving original intact after compressing and minifying as it is difficult to edit a minified file(s).To minify and compress your theme first download and upload the plugin to the plugins folder and activate the plugin.

Similar Post  How To View Webpage Source Code In External Editor From Firefox.

Once activated the settings for the plugin can be found “ Settings –> Theme Minifier ”.

  1. Select the theme that you intend to compress and minify.
  2. Check CSSTidy to compress CSS
  3. Select JS Compression Method – JSMin / Packer.
  4. Press “Minify It”.

Once the compression and minify is complete the list of all files with the details like old file size and new file size and total saving in size and percentage is shown.

4 comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.