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

February 3, 2010  | 
7 Comments

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:

wp-content/plugins/wp-minify/min/?f=/wp-content/plugins/buddypress/bp-themes/bp-default/style.css

wp-content/plugins/wp-minify/min/?f=/wp-includes/js/jquery/jquery.js,/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js,/wp-content/plugins/sidebar-post/js/validate.js

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)

jsnotminified

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

jsminified

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.

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - Host sites, get paid, just like WordPress.com

If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more

Featured Plugin - Easily integrate your WordPress site with Facebook

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - Send beautiful html email newsletters, from WordPress!

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - Every great SEO tweak you need, in one snazzy bundle

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - WordPress + Google Maps = Perfect

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

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

  1. Installing the Minify plugin it managed to clip off around about 1 whole second in download time according to Pingdoms tools so thanks for the heads up on this plugin.

  2. We’ve always had mixed success with this plugin on our installs. Our Yslow / PageSpeed scores improve using it, but these tools also show us that our pages take about 2 more second to load and I see this in real world page views as well. This is with and without super cache installed….. go figure. :)

  3. Another good tip for Buddypress, that I will, once again be using for my current project.

  4. Do I need to activate it site-wide on WPMU?

  5. Thanks for the tip. This really worked!

  6. Just realized that minify breaks the voting javascript on the buddypress links plugin.

  7. I can’t install the plugin sitewide. I upload it to the mu-plugins folder and then what? Please help.

Click on a tab to select how you'd like to leave your comment

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting