Speed Up Your WordPress / BuddyPress Loading Time With This Quick Tip

Speed Up Your WordPress / BuddyPress Loading Time With This Quick Tip

Minify is a PHP 5 app that “combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers.” The WP Minify plugin makes it easy to integrate Minify into your WordPress / BuddyPress site and in most cases will work right out of the box without any adjustments.

How Does the WP Minify Plugin Work?

According to the plugin page:

WP Minify intercepts theme rendering at the get_header WordPress hook and puts everything that is echoed/outputted from the PHP code into an output buffer.
WP Minify then intercepts theme rendering again at the get_footer WordPress hook to stop the output buffer.
The plugin then evaluates the page content to extract all JavaScripts and stylesheets out.
The minified version of these JavaScripts and stylesheets are then re-injected into the content.
The page content is echoed/outputted as normal.

Installation is simple. Go to Plugins >> Add New. Activate WP Minify. Make sure you make the wp-content/plugins/wp-minify/cache writeable by the server. You shouldn’t have to do anything else.

How Will I Know WP Minify is Working?

After you activate the plugin, view the source of your site and you should see it outputting the CSS and JS files with paths similar to this:



You should also notice a difference in your site loading speed. I noticed a significant increase in speed on my test site right away. Here are screenshots from my Firebug before and after.

My test site’s HTTP Requests BEFORE WP Minify (3 Javascript Requests @ 96KB)


My test site’s HTTP Requests AFTER WP Minify (1 Javascript Request @ 27KB)


My HTTP requests were reduced to a fraction of what they were before minifying the files. That was simply a BuddyPress test site with very little content. Your results are bound to better than mine. Take two minutes to install and activate this plugin and you will make your site a few seconds more zippy than it was before. Those couple of seconds can make a huge difference in the world of internet time where impatient users will leave unless you instantly capture their attentions. Please also note that this plugin does work with WP Super Cache. If you have any issues, check out the developer’s post on troubleshooting WP Minify.