MySQL database cluster (write and read endpoints)

[ad_1]

Hello,

We are using Pro version of the W3 Total Cache plugin and just found this post which states that is possible to use different endpoints for a database cluster.
I have copied dbcluster-config-sample.php file into /wp-content/db-cluster-config.php and removed the comment for the following lines (line 154):

$w3tc_dbcluster_config = array(
‘databases’ => array(
‘master’ => array(
‘host’ => DB_HOST,
‘user’ => DB_USER,
‘password’ => DB_PASSWORD,
‘name’ => DB_NAME
),
‘slave’ => array(
‘host’ => READER_HOST,
‘user’ => DB_USER,
‘password’ => DB_PASSWORD,
‘name’ => DB_NAME,
‘write’ => false,
‘read’ => true,
‘timeout’ => 0.2,
)

I have also declared ‘READER_HOST’ in my wp-config.php config file as follows:

define(‘READER_HOST’, ‘mysql-cluster.eu-west-1.rds.amazonaws.com’ );

Now I’m trying to find the button you mentioned in your post but I’m not able to find the ‘Enable database cluster’ button on the General Settings -> Database Cache page. What am I missing?

We are using the latest 2.3.2 version of the plugin for a WordPress single site, not multisite/network.

Thank you in advance 🙂

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer