Title: Multiple SQL DataBase for One WordPress
Last modified: August 20, 2016

---

# Multiple SQL DataBase for One WordPress

 *  [mahmudayaz](https://wordpress.org/support/users/mahmudayaz/)
 * (@mahmudayaz)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/multiple-sql-database-for-one-wordpress/)
 * Hey,
 * I am using byethost hosting and mysql database limit is 50mb only, which is now
   going to reached. i want to know that can i use multiple SQL database for the
   same wordpress installation?
 * Waiting for expert reply
 * Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 10 months ago](https://wordpress.org/support/topic/multiple-sql-database-for-one-wordpress/#post-2237766)
 * _Before doing any of this, make a backup!_
 * First off, clean up all your posts revisions in SQL:
 * `DELETE FROM wp_posts WHERE post_type = "revision";`
 * Second disable the whole revision system. If space is THAT monitored, you’ll 
   need this in your wp-config.php file:
 *     ```
       /** Turn off Post Revisions without a plugin **/
       define('WP_POST_REVISIONS', false);
   
       /** Empty Trash Automatically  **/
       define('EMPTY_TRASH_DAYS', 5 );
       ```
   
 * My DB is only 17.1 megs (the other is 20) and I’ve had both blogs for a long 
   time AND they’re well used. So you SHOULD be able to keep it under 50 just by
   doing that.
 * How many posts are we talking about? How many plugins? WHICH plugins? Some of
   them are less friendly to DB space than others.
 * You CAN split WP over DBs, but it’s not easy, so if we can avoid it…
 *  Thread Starter [mahmudayaz](https://wordpress.org/support/users/mahmudayaz/)
 * (@mahmudayaz)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/multiple-sql-database-for-one-wordpress/#post-2237857)
 * Hey Ipstenu,
 * Thanks buddy..
 * but unfortunately, if my site is too big and can’t work this system then is there
   any procedure to Split WP between two or more DBs? any plugin? or something else..
 * I am very thankful to you. if you give me the more information.
 * Thanks
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 10 months ago](https://wordpress.org/support/topic/multiple-sql-database-for-one-wordpress/#post-2237887)
 * There is, but again, how many posts are we talking about? How many plugins? WHICH
   plugins? Some of them are less friendly to DB space than others.
 * How big ARE you, really, once you clean out revisions and such? Because THAT 
   is a benchmark you really NEED to know before you go further. You need to sort
   out how much space you’re using, get a rough idea how long it takes you to use
   that much, and then you’ll have an idea how to scale.
 * [http://wordpress.org/extend/plugins/shardb/](http://wordpress.org/extend/plugins/shardb/)
   and [http://wordpress.org/extend/plugins/hyperdb/](http://wordpress.org/extend/plugins/hyperdb/)
   are the two plugins I know for this one. but BEFORE you just use ’em, you really
   should clean up first 🙂 It’s the same idea as throwing out everything you don’t
   need before you move 😉
 *  Thread Starter [mahmudayaz](https://wordpress.org/support/users/mahmudayaz/)
 * (@mahmudayaz)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/multiple-sql-database-for-one-wordpress/#post-2237895)
 * Thanks thanks thanks alot buddy… one more and last question…
 * where should i paste this code in wp-config.php?
 *     ```
       /** Turn off Post Revisions without a plugin **/
       define('WP_POST_REVISIONS', false);
   
       /** Empty Trash Automatically  **/
       define('EMPTY_TRASH_DAYS', 5 );
       ```
   
 * last on the page or something middle etc?
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 10 months ago](https://wordpress.org/support/topic/multiple-sql-database-for-one-wordpress/#post-2237902)
 * Middle. Above the section that says ‘Stop Editing Here’.
 * I put it right below where the debug line is.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Multiple SQL DataBase for One WordPress’ is closed to new replies.

## Tags

 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 5 replies
 * 2 participants
 * Last reply from: [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/multiple-sql-database-for-one-wordpress/#post-2237902)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
