Difference between revisions of "How to optimize wordpress with Mysql replication"
Line 1: | Line 1: | ||
+ | <span data-link_translate_de_title="Gewusst wie: Optimierung von Wordpress mit Mysql Replikation" data-link_translate_de_url="Gewusst+wie%3A+Optimierung+von+Wordpress+mit+Mysql+Replikation"></span>[[:de:Gewusst wie: Optimierung von Wordpress mit Mysql Replikation]][[de:Gewusst wie: Optimierung von Wordpress mit Mysql Replikation]] | ||
<span data-link_translate_nl_title="Hoe te optimaliseren wordpress met Mysql replicatie" data-link_translate_nl_url="Hoe_te_optimaliseren_wordpress_met_Mysql_replicatie"></span>[[:nl:Hoe te optimaliseren wordpress met Mysql replicatie]][[nl:Hoe te optimaliseren wordpress met Mysql replicatie]] | <span data-link_translate_nl_title="Hoe te optimaliseren wordpress met Mysql replicatie" data-link_translate_nl_url="Hoe_te_optimaliseren_wordpress_met_Mysql_replicatie"></span>[[:nl:Hoe te optimaliseren wordpress met Mysql replicatie]][[nl:Hoe te optimaliseren wordpress met Mysql replicatie]] | ||
<span data-link_translate_it_title="Come ottimizzare wordpress con la replica di Mysql" data-link_translate_it_url="Come+ottimizzare+wordpress+con+la+replica+di+Mysql"></span>[[:it:Come ottimizzare wordpress con la replica di Mysql]][[it:Come ottimizzare wordpress con la replica di Mysql]] | <span data-link_translate_it_title="Come ottimizzare wordpress con la replica di Mysql" data-link_translate_it_url="Come+ottimizzare+wordpress+con+la+replica+di+Mysql"></span>[[:it:Come ottimizzare wordpress con la replica di Mysql]][[it:Come ottimizzare wordpress con la replica di Mysql]] |
Revision as of 12:52, 27 December 2016
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