How To Increase Your WordPress Site Performance (Without Losing Functionality) by 10 Times

By Angsuman Chakraborty, Gaea News Network
Sunday, December 31, 2006

WordPress bloggers often engorge themselves with tons of plugins which are freely available (free wordpress plugins we provide). However quality is not assured with most of the free plugins out there in the wild and often they end up significantly slowing the site. How can you assure optimum performance without sacrificing functionality?

Note: We do extensive QA and performance testing of our WordPress plugins before we release them. We can assure you of their quality and performance.

Caching
You must consider using a caching plugin to optimize your site for performance. Caching can drastically improve your site performance by storing your generated pages and serving them instead of creating them on the fly which involves lots of PHP processing and more significantly MYSQL database access. Both of them affect your scalability which is addressed by a caching plugin.

wp-cache 2 Plugin
I recommend wp-cache 2 at this time. You will however need to deactivate compression on the Miscellaneous options screen and ensure “that gzip encoding is turned off on the PHP level”.

I recommend it over external caching engines like eAccelerator because it is senstive to changes in WordPress content and will automatically refresh the cache. However it has a downside. On highly commented sites the effects of caching is negated because of frequent cache refreshes. This can be addressed by this tip:
How to improve performance of highly commented WordPress blogs

Personally I have seen that it works fine even with gzip encoding at php level. But I have a better solution as described below in compression.

WordPress Object Caching
WordPress introduced file based caching of php objects in 2.x versions. It caches recurrently used php objects thereby reducing MySQL calls and improving performance.
It is currently disabled by default. You can enabled it by adding the line define(’ENABLE_CACHE’, true); after define (’WPLANG’, ”);. So it will look like this:

define ('WPLANG', '');
define('ENABLE_CACHE', true);

Object cache may cause performance penalty when the available memory is low and too many Apache processes are allowed. With caching enabled each Apache process (or Thread), serving a WordPress page request, caches at most 124 php objects which can increase memory consumption.
As a result kswapd (swap manager) comes into play and at high loads it tends to swap too often and ends up consuming most of the CPU cycles itself instead of allowing actual processing.
So if you are on a low end machine with low RAM or if you are sharing the machine with lots of other users then you can experience performance issues. However you can easily solve it by either increasing the memory or reducing the maximum number of Apache processes you serve. In short object cache can be used to improve your performance.

Compression
Using compression on your web content enables you to serve your pages significcantly faster, even upto 7 times faster. You can turn on compression in your web server. In compressing php output with wp-cache2 wordPress plugin I explained how you can easily enable gzip compression on top on wp-cache 2 to further speed up your site.

If you do not have mod_deflate module activated and you cannot request your web hosting provider to do it for you then you have an alternative. You can use php compression by adding these lines to your .htaccess file in WordPress base directory:

php_flag zlib.output_compression on
php_value zlib.output_compression_level 2

I have tested them on this blog site and they do not conflict with wp-cache 2 plugin.

Use plugins judiciously
While we all have a tendency to add cool plugins when we find them, each comes with a cost. Any plugin serving dynamic content adds to your page processing time. When your site grows and you start getting more visitors you will feel the load on your server. So experiment with plugins but stick with the ones you really need.

With these tools in your arsenal you will be able to serve very high loads, even Digg effects, without breaking a sweat.

Discussion

Affiliate Dot Com
August 17, 2010: 5:06 pm

I had no idea this was the way it was. I have now changed my views.

April 23, 2010: 10:08 am

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now.

January 19, 2010: 2:05 pm

Thanks for sharing your info with us, thanks a lot :)

January 19, 2010: 4:08 am

Woww great’!

January 19, 2010: 4:02 am

Wow!! Thats good advice…

January 8, 2010: 7:49 pm

Just a questions… Do you know how to disable WordPress from caching pages temporary so I can turn it off while developing, but turn it back on when the site is live?

January 8, 2010: 7:48 pm

thanks for the compression tip. i learned sthg new

July 23, 2009: 10:32 am

Great! Woo!
I agree with you!

Thank you for sharing this with us.

June 13, 2009: 3:14 am

good review… Thanks for the info..

May 27, 2009: 7:47 am

i am using godaddy.com for hosting and i use worldpress
. my site performace is very slow, its taking 1 minute or more to load. i want to know it is godaddy problem
or its in wordpress in our coding, although is fast on localhost

Need Reply

Thanks in Advance
Amit

March 24, 2009: 5:35 am

It didn’t worked for me. I’ve tried at one of my blogs and couldn’t get it work :(

January 22, 2009: 2:53 pm

thanks for the compression tip.

January 6, 2009: 11:36 am

thanks for the compression tip.. i’m definitively gonna apply that in my site..
jan

December 16, 2008: 10:17 pm

Mod_deflate in apache2 is pretty much the same as mod_gzip in apache1.3, and mod_deflate is included with the apache2 source package. Both modules allow compressing of the apache server on the fly

https://railsgeek.com/2008/12/16/apache2-httpd-improving-performance-mod_deflate-gzip

April 20, 2008: 7:28 am

The WordPress cache really screwed my debugging when I was developing my first plugin!

I couldn’t figure out what the heck was going on. I make changes to the code, but could get anything to reflect on the blog itself.

It was only when I noticed that there’s a cache folder under wp-content/cache that I realized why I couldn’t debug it! lol

So now I remember to delete all cache while developing.

Just a questions… Do you know how to disable WordPress from caching pages temporary so I can turn it off while developing, but turn it back on when the site is live?

Take care,
Paul

February 10, 2008: 8:03 pm

thanks for the compression tip. i learned sthg new.

January 3, 2007: 8:20 am

[...] How To Increase Your WordPress Site Performance (Without Losing Functionality) by 10 Times -Simple Thoughts - Java and Web Blog Caching - wp-cache 2 Plugin - Compression - Use plugins judiciously (tags: Wordpress Plugin Howto) [...]

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :