Hoe te optimaliseren wordpress met een Mysql replicatie
de:Wie Wordpress mit einem Mysql-Replikation zu optimieren
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
en:How to optimize wordpress with a Mysql replication
fr:Comment optimiser wordpress avec une replication Mysql
Dit artikel is vertaald door middel van automatische vertalingssoftware. U kunt het artikel bron hier te bekijken.
De installatie zal worden gedaan vanaf de opdrachtregel ssh maar zeer goed uw lokale pc en FTP worden verzonden.
1. Sinds de basismap, download en unzip dit bestand :
cd ~; wget http://downloads.wordpress.org/plugin/hyperdb.zip
sudo apt-get install zip
unzip hyperdb.zip
2. De Standaardconfig in de hoofdmap van de site-bestand kopiëren en bewerken :
cp ~/hyperdb/db-config.php /var/www/
vi /var/www/db-config.php
3. Ga naar de volgende passage in het bestand, en DB_HOST vervangen door 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. Voeg deze regel toe in het bestand wp - config.php
define('DB_SLAVE_1', 'IP_du_serveur_mysql_slave');
5. Tot slot Kopieer dit bestand zodat alle.
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
Automatisch bijwerken van reacties inschakelen