Difference between revisions of "How to optimize wordpress with a Mysql replication"

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽
Line 1: Line 1:
 +
<span data-link_translate_nl_title="Hoe te optimaliseren wordpress met een Mysql replicatie"  data-link_translate_nl_url="Hoe+te+optimaliseren+wordpress+met+een+Mysql+replicatie"></span>[[:nl:Hoe te optimaliseren wordpress met een Mysql replicatie]][[nl:Hoe te optimaliseren wordpress met een Mysql replicatie]]
 
<span data-link_translate_it_title="Come ottimizzare wordpress con una replica di Mysql"  data-link_translate_it_url="Come+ottimizzare+wordpress+con+una+replica+di+Mysql"></span>[[:it:Come ottimizzare wordpress con una replica di Mysql]][[it:Come ottimizzare wordpress con una replica di Mysql]]
 
<span data-link_translate_it_title="Come ottimizzare wordpress con una replica di Mysql"  data-link_translate_it_url="Come+ottimizzare+wordpress+con+una+replica+di+Mysql"></span>[[:it:Come ottimizzare wordpress con una replica di Mysql]][[it:Come ottimizzare wordpress con una replica di Mysql]]
 
<span data-link_translate_pt_title="Como otimizar wordpress com uma replicação do Mysql"  data-link_translate_pt_url="Como+otimizar+wordpress+com+uma+replica%C3%A7%C3%A3o+do+Mysql"></span>[[:pt:Como otimizar wordpress com uma replicação do Mysql]][[pt:Como otimizar wordpress com uma replicação do Mysql]]
 
<span data-link_translate_pt_title="Como otimizar wordpress com uma replicação do Mysql"  data-link_translate_pt_url="Como+otimizar+wordpress+com+uma+replica%C3%A7%C3%A3o+do+Mysql"></span>[[:pt:Como otimizar wordpress com uma replicação do Mysql]][[pt:Como otimizar wordpress com uma replicação do Mysql]]

Revision as of 10:27, 2 October 2015

nl:Hoe te optimaliseren wordpress met een Mysql replicatie it:Come ottimizzare wordpress con una replica di Mysql pt:Como otimizar wordpress com uma replicação do Mysql es:Cómo optimizar wordpress con una replicación Mysql fr:Comment optimiser wordpress avec une replication Mysql


This article has been created by an automatic translation software. You can view the article source here.



The installation will be done command-line ssh but very well be from your local pc and FTP are sent.


1. Since the home folder, download then unzip this file :

cd ~; wget http://downloads.wordpress.org/plugin/hyperdb.zip
sudo apt-get install zip
unzip hyperdb.zip


2. Copy the default config in the root of the site file and edit :

cp ~/hyperdb/db-config.php /var/www/
vi /var/www/db-config.php


3. Locate the following passage in the file, and replace DB_HOST by DB_SLAVE_ 1

$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 the file wp - config.php

define('DB_SLAVE_1', 'IP_du_serveur_mysql_slave');


5. Finally copy this file to enable all.

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



[[:fr:category:Serveur dédi��]]


You are not allowed to post comments.