Created
March 17, 2015 21:16
-
-
Save trepmal/eab673549509a0722e52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* HyperDB configuration file | |
* | |
* This file should be installed at ABSPATH/db-config.php | |
* | |
* $wpdb is an instance of the hyperdb class which extends the wpdb class. | |
* | |
* Fully documented config file: | |
* http://plugins.svn.wordpress.org/hyperdb/trunk/db-config.php | |
*/ | |
/** | |
* Basic Master/Slave server setup | |
*/ | |
$wpdb->add_database(array( | |
'host' => DB_HOST, // If port is other than 3306, use host:port. | |
'user' => DB_USER, | |
'password' => DB_PASSWORD, | |
'name' => DB_NAME, | |
)); | |
$wpdb->add_database(array( | |
'host' => DB_SLAVE, // If port is other than 3306, use host:port. | |
'user' => DB_USER, | |
'password' => DB_PASSWORD, | |
'name' => DB_NAME, | |
'write' => 0, | |
'read' => 1, | |
'dataset' => 'global', | |
'timeout' => 0.2, | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment