I've got a WordPress multisite installation that's hosting enough blogs I need to shard the database. I see there are three plugins available to spread WordPress across multiple databases:

I'm trying to decide which one to use, but I haven't really found much info comparing them.

Does anyone have experience deploying any of these three tools? Or better yet, experience with more than one of them and a rundown of why you switched?

Thanks, Bethany

  • As I am new to this "Data Base" configuring , I guess I will have to try the easiest one first, because I will be the only one working on all 24 sites and speed is an issue. I thank you all so much ! I truly didn't think I would get any answers, let alone so fast Thanks. I hope this works wish me luck :) Faith
    – Faith McNulty
    Jan 10, 2011 at 8:33
  • @Faith: Are you the same person as "Bee", who asked the question? Is there a reason you can't use that login anymore? This is not the same system as a forum, so you should not write a thank you note in an answer, but use the voting system (once you have enough "reputation" to do that).
    – Jan Fabry
    Jan 10, 2011 at 10:45
  • Bee, please select one answer as "the answer" :)
    – hakre
    Jan 10, 2011 at 12:35

3 Answers 3


Personally, I use none of them. And an NDB cluster instead. NDB is MySQL's built-in master-master replication engine.

The only limitation of NDB in practice is the lack of full text index. But you can always use yahoo or google's API for searches within your site. I found it worth the extra redundancy, especially when considering that no server ends up being a db write bottle neck.

If master-slave replication with a write bottle neck is what you need, hyperdb is developed by automattic, so it's the safer bet among the plugins you highlighted. That said, note that part of the hyperdb code is actually back ported into wp since 3.0 and the wpmu merge. (See the wp-db.php file in wp-includes, you'll notice a lot of it can handle multiple db servers out of the box.)

  • To add to this approach (to solve the problem on the database layer): You can proxy MySQL servers as well. And there is more benefit to replace the WPDB class with one that is making use of mysqli or even mysqlnd for more performance on the PHP side.
    – hakre
    Jan 10, 2011 at 12:32

I would go with HyperDB.

It's developed by core WP developers and based on code used at Wordpress.com.


SharDB might be a little easier to setup but probably has less features than HyperDB. I'd say take a look at those two and figure out which one best matches your needs.

  • Hey, thanks so much for the input! HyperDB certainly is flexible and full featured.. possibly more-so than I need.
    – Bee
    Oct 13, 2010 at 3:03

Matt spoke at our company a few months ago. He recommended a master-slave DB setup with many R/O slaves. His rationale was that writes were expensive and reads—much higher in volume!—were not, so it was better to have more read capacity. Ditto for app servers: throw cheap hardware at the issue and forget about supercache.

  • This sounds like a great option, but can you explain a little more about how you would go about accomplishing this? (i.e. How to configure WP such that writes go to the master and reads go to one of the slaves) Is there a plugin that can assist with this? Or is it DB-level configuration/some other tool?
    – rinogo
    Aug 11, 2015 at 2:30
  • 1
    Perhaps this? "HyperDB allows you to split database writes and reads and assign each to an array of servers."(codex.wordpress.org/HyperDB#Replication)
    – rinogo
    Aug 11, 2015 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.