22 Comments
- jggube, on 03/24/2009, -3/+11To me, #2 is the most important: removing unnecessary plugins. Plugins are made for all sorts of situations and system set-up, and therefore does a lot of checks to do its processes. Whereas if you can write it directly into your theme, it could save you a lot of processing requirements. For example, generating a most recent list of posts doesn't need to be a plugin, you can do it in 1 line of WP functions.
- Otto, on 03/24/2009, -0/+7My comments on these:
#4 and #13 are basically doing the exact same thing. Do one or the other, doing both is redundant.
#11: There's a plugin that does all this grunt work for you, quite effectively: http://wordpress.org/extend/plugins/use-google-lib ...
This plugin basically replaces the internal script queues with the correct links to Google's versions, making ALL uses of those libraries go to Google's servers instead. This causes a fairly massive speedup for the admin side of most sites which are on (slow) shared hosting. I highly recommend using this plugin instead of rolling your own type of thing, as the correct way to use scripts in 2.7 is not with script tags, but with wp_enqueue_script functions and such (for a lot of reasons). This is compatible with that method.
#10: I can't see DB Cache making any significant improvement in *speed* to any real site, although it will certainly reduce the number of queries. Back before WordPress 2.5, it contained a built in feature known as the object cache, which could be enabled to write the contents of all major queries to disk and retrieve them from there instead of from the DB. This was removed (sorta) because it made most sites much slower. The reason is that disk access for data is often slower than hitting the database. While this seems counter-intuitive, there's actually a few reasons for it:
a) On many cloud-type sites, the disk in question is not physically on that machine, but a shared filesystem like NFS or something, meaning that you're causing a network hit to get data from the disk anyway.
b) Databases are really efficient at storing and retrieving data from the disk. More so than you are capable of writing.
c) mySQL already has a built-in query cache that stores the most common queries and results in fast RAM instead of on a disk.
So I can't recommend use of the DB Cache plugin. It's unlikely to improve things. If it does improve things, then you probably have a problem in your database server that needs to be addressed instead. - justdru, on 03/24/2009, -0/+5This story is worth digging for the include of Shrink O’Matic alone. Easily one of the greatest outcomes of AIR thus far in my opinion.
- Otto, on 03/24/2009, -0/+4Database caching is built in, as an internal object cache. However, caching to disk doesn't work well, as past experience has shown. The reason the internal object cache is not enabled except via a plugin is that different sites use difference ways to store their objects in different places. There's a plugin to store the objects in a Memcached setup, for example, if you wanted to do that.
Output caching doesn't make sense on most sites. WordPress can handle a normal traffic flow just fine, output caching only really helps on already overloaded servers (of which there are sadly plenty, thanks to shared hosting and overselling of web server space).
WordPress itself doesn't "rape" anything. It's actually quite fast and efficient without any major modifications. Of course, stick a ton of plugins onto it and you can bring anything to its knees. - Otto, on 03/24/2009, -0/+3Not necessarily. If a plugin is written correctly (mostly functions), then not used on a particular page, then it incurs very little overhead, as PHP doesn't pre-process the code until execution time. It parses and executes on-the-fly. The only performance penalty is the time taken to read/load the plugin file.
This does depend on the plugin's architecture, of course. A plugin can do things badly, but a plugin to generate a list of most recent posts (to use your example) would likely just contain a function that you'd call from your theme or a widget or something. That code would not cost any cpu cycles until you actually used it to generate the list of recent posts. Which you'd also do by putting the code directly in a theme...
Plugins are often much better than rolling your own code. Not always, but most of the time. - lektroluv, on 03/24/2009, -0/+3Are you sure this will get me MAX Performance?
- jggube, on 03/24/2009, -0/+2Leave the Caps Lock button alone!
- Jafo232, on 03/26/2009, -0/+2This article is lame. There are so many more ways to increase WP speed. The ones listed in this article are no brainers. How about opcode caching, or MySQL caching.. Sheesh..
- nmanguy, on 03/24/2009, -0/+2WTF? Was this written by a grammar-impaired 15 year old? "How is babby formed" is better than "WordPress 2.7 have manny performance improvements over previous versions. So you better upgrade to latest release to make use of this."
- bl4k3r, on 03/24/2009, -1/+2"Each time a page on your site loads, if your browser has to execute any PHP queries, it adds to the load time."
Pardon, what? A browser that executes PHP queries? That's total ***** as long as your server doesn't keep up with rendering the HTML! - cloudberries, on 03/24/2009, -0/+1I the Wordpress too!
Yours Sincerely,
www.pissandvinegar.com - kevine, on 03/24/2009, -0/+1What you say makes a lot of sense and thanks for taking the time to share the information.
I've used the DB Cache plugin now on a few sites and it's sped them all up a noticeable amount.
I'm curious as to what problems could exist in the database server? I'm using 1&1 and I've seen improvements both in the shared hosting and dedicated hosting when using DB Cache. - Otto, on 03/25/2009, -0/+1Probably it's just overloaded. I've seen that sort of thing a lot on shared hosting.
Instead of using DB Cache, try using a plugin to enable the built-in object caching mechanism to use files instead. Like this one: http://neosmart.net/blog/2008/file-based-extension
This is a better solution because it's using the object cache instead of whole query caching. The object cache is far more efficient. - claires, on 03/24/2009, -1/+2This is really important, my blog slows down under plugin pressure and image size, nice list thanks
- liltbrockie, on 03/24/2009, -0/+1FAX me the results
- tortfeasor2009, on 03/25/2009, -0/+0Wordpress and template makers are badass, for those of us that don't have a functional knowledge of PHP and CSS it allows us to put up real content that looks good. We need these updates, unlike Twitter, to make the process more efficient - at least there is a reason for the spam.
- renesisx, on 03/24/2009, -4/+3What boggles my mind is that Wordpress requires so many plugins to stop it raping hell out of any server. Things like database and output caching that should have been built-in at the base level need to be installed and configured as extras.
Every other blog platform includes these features as it makes very little sense to run without them. - inactive, on 03/24/2009, -1/+0Then show me something better with the same feature set? Oh I forgot, you can't, because wordpress is the absolute ***** best out there.
- Elranzer, on 03/24/2009, -3/+1I almost forgot that WordPress used to get spammed on Digg in 2008 as much as Twitter does in 2009.
- rnawky, on 03/24/2009, -9/+5How does this stuff make it to the front page? It's a list of common sense things to do.
Example of a similar story with the potential of hitting the front page:
HOW TO SPEED UP WINDOWS.
1) INSTALL THE LATEST SERVICE PACK
2) DISABLE UNUSED SERVICES
3) REMOVE PROGRAMS YOU DON'T USE
4) DEFRAGMENT YOUR HARD DRIVE
5) RUN DISK CLEANUP
Really? - inactive, on 03/24/2009, -9/+0http://dwarfurl.com/007c0 wow!!
- Threlly1, on 03/24/2009, -12/+2I dugg this because talking about Wordpress functionality makes me horny.
Now, how do I select the sarcasm font....



What is Digg?