How to optimize wordpress with Mysql replication
pl:Jak zoptymalizować wordpress z replikacji Mysql
ja:ワードプレスの Mysql のレプリケーションを最適化する方法
ar:كيفية تحسين وورد مع النسخ المتماثل الخلية
zh:如何优化 wordpress 与 Mysql 复制
de:Gewusst wie: Optimierung von Wordpress mit Mysql Replikation
nl:Hoe te optimaliseren wordpress met Mysql replicatie
it:Come ottimizzare wordpress con la replica di Mysql
pt:Como otimizar wordpress com replicação do Mysql
es:Cómo optimizar wordpress con replicación Mysql
fr:Comment optimiser wordpress avec réplication de Mysql
This article has been created by an automatic translation software. You can view the article source here.
In this article, the installation will be done via SSH command line, but it may very well on your local PC (Notepad) and then be sent via FTP.
1. In the home directory, download and suits:
cd ~; wget http://downloads.wordpress.org/plugin/hyperdb.zip
sudo apt-get install zip
unzip hyperdb.zip
2. Copy the default configuration file to the root of the site edit this:
cp ~/hyperdb/db-config.php /var/www/
vi /var/www/db-config.php
3. Search in the file, the following passage and replace by DB_SLAVE_ DB_HOST1
$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,
'write' => 0,
'read' => 1,
'dataset' => 'global',
'timeout' => 0.2,
));
4. Add this line in URwp-config.php
define('DB_SLAVE_1', 'IP_du_serveur_mysql_slave');
5. Finally: Copy the file.
cp ~/hyperdb/db.php /var/www/wp-content/
chmod a-w /var/www/wp-content/db.php
chown -R www-data:www-data /var/www/wp-content/db.php
chown -R www-data:www-data /var/www/db-config.php
WordPress offers needed? Check the site of Ikoula. Ikoula Wordpress.
Enable comment auto-refresher