Différences entre versions de « Comment optimiser wordpress avec une replication Mysql »
(3 versions intermédiaires par 2 utilisateurs non affichées) | |||
Ligne 14 : | Ligne 14 : | ||
<span data-link_translate_en_title="How to optimize wordpress with a Mysql replication" data-link_translate_en_url="How+to+optimize+wordpress+with+a+Mysql+replication"></span>[[:en:How to optimize wordpress with a Mysql replication]][[en:How to optimize wordpress with a Mysql replication]] | <span data-link_translate_en_title="How to optimize wordpress with a Mysql replication" data-link_translate_en_url="How+to+optimize+wordpress+with+a+Mysql+replication"></span>[[:en:How to optimize wordpress with a Mysql replication]][[en:How to optimize wordpress with a Mysql replication]] | ||
<!-- Début de l'article. Placez votre texte ci-après et n'hésitez pas à personnaliser les chapitres selon votre besoin --> | <!-- Début de l'article. Placez votre texte ci-après et n'hésitez pas à personnaliser les chapitres selon votre besoin --> | ||
+ | |||
{{#seo: | {{#seo: | ||
− | |title= | + | |title=Comment optimiser wordpress avec une replication Mysql |
|title_mode=append | |title_mode=append | ||
− | |keywords= | + | |keywords= |
− | |description= | + | |description=Découvrez dans cet article comment optimiser wordpress avec une replication Mysql |
|image=Uploaded_file.png | |image=Uploaded_file.png | ||
|image_alt=Wiki Logo | |image_alt=Wiki Logo | ||
}} | }} | ||
+ | |||
+ | ==Optimiser wordpress avec une replication MySQL== | ||
Dans cet article, l'installation sera faite en ligne de commande SSH mais elle peut très bien se faire depuis votre PC local et être envoyée en FTP. | Dans cet article, l'installation sera faite en ligne de commande SSH mais elle peut très bien se faire depuis votre PC local et être envoyée en FTP. | ||
− | |||
1. Depuis le dossier home, téléchargez puis décompressez ce fichier : | 1. Depuis le dossier home, téléchargez puis décompressez ce fichier : |
Version actuelle datée du 10 septembre 2021 à 12:54
fr:Comment optimiser wordpress avec une replication Mysql he:מיטוב wordpress עם העתק Mysql ro:Cum să optimizaţi wordpress cu o replicare Mysql ru:Как оптимизировать wordpress с Mysql репликации pl:Jak zoptymalizować wordpress z replikacji Mysql ja:ワードプレスの Mysql のレプリケーションを最適化する方法 ar:كيفية تحسين وورد مع تكرار الخلية zh:如何优化 wordpress 与 Mysql 复制 de:Wie Wordpress mit einem Mysql-Replikation zu optimieren 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 en:How to optimize wordpress with a Mysql replication
Optimiser wordpress avec une replication MySQL
Dans cet article, l'installation sera faite en ligne de commande SSH mais elle peut très bien se faire depuis votre PC local et être envoyée en FTP.
1. Depuis le dossier home, téléchargez puis décompressez ce fichier :
cd ~; wget http://downloads.wordpress.org/plugin/hyperdb.zip
sudo apt-get install zip
unzip hyperdb.zip
2. Copiez le fichier de config par défaut à la racine du site et éditez-le :
cp ~/hyperdb/db-config.php /var/www/
vi /var/www/db-config.php
3. Recherchez dans le fichier, le passage suivant et remplacez DB_HOST par 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. Ajoutez cette ligne dans le fichier wp-config.php
define('DB_SLAVE_1', 'IP_du_serveur_mysql_slave');
5. Enfin copiez ce fichier pour activer le tout.
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
Retrouvez la page dédiée à notre offre Wordpress sur le site Ikoula.
Activer l'actualisation automatique des commentaires