Slow Posting Performance in WordPress 2.7

An inter­est­ing prob­lem today — Word­Press post­ing on this site was sloooooow.  Some other back-end tasks were also incred­ibly slow.

Adding a post or page would take about 30 to 60 seconds.  Unac­cept­able.  I did the usual job of deac­tiv­at­ing plu­gins, and even resor­ted to a dif­fer­ent theme for a few minutes but no, it was all still very slow.

That’s when the work starts.  On this server we haven’t opened up port 3600 to allow remote con­nec­tion with mySQL Admin­is­trator, so instead it’s straight into phpMyAdmin.

The pro­cess is then pretty simple — for each table you have an Oper­a­tions tab.  Here you can see some inform­a­tion about the state of the table as well as quick links at the bot­tom to allow you to run vari­ous tools.  The pro­cess I use is to backup the site then run a Repair then an Optim­ize on the _posts (typ­ic­ally tables are pre­fixed WP_) , _postmeta and _options tables.

Why the Slowdown?

Well, I didn’t bother invest­ig­at­ing prop­erly — without full server access it’s often hard to get full tim­ings.  You can put traces into code and look at logs, or you can very quickly run the Repair pro­cess.  But what I do know is that data­bases can slow down for inserts more eas­ily than for reads.  This is usu­ally because something’s become messed up in an Index, or the whole table’s become inef­fi­ciently organ­ised over time.  By repair­ing and optim­iz­ing you get to quickly tidy things up and restore the per­form­ance of the site.

For a minor site like this, it’s about the best approach to take.  If you’re run­ning some­thing like Face­book you’ll prob­ably want to invest­ig­ate things prop­erly — but then you’ll have the money to be able to do so as well!

Leave a Comment

Threaded commenting powered by Spectacu.la code.