Hoe te optimaliseren wordpress met Mysql replicatie: verschil tussen versies
Jump to navigation
Jump to search
| (Een tussenliggende versie door dezelfde gebruiker niet weergegeven) | |||
| Regel 1: | Regel 1: | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
<span data-link_translate_es_title="Cómo optimizar wordpress con replicación Mysql" data-link_translate_es_url="C%C3%B3mo+optimizar+wordpress+con+replicaci%C3%B3n+Mysql"></span>[[:es:Cómo optimizar wordpress con replicación Mysql]][[es:Cómo optimizar wordpress con replicación Mysql]] | <span data-link_translate_es_title="Cómo optimizar wordpress con replicación Mysql" data-link_translate_es_url="C%C3%B3mo+optimizar+wordpress+con+replicaci%C3%B3n+Mysql"></span>[[:es:Cómo optimizar wordpress con replicación Mysql]][[es:Cómo optimizar wordpress con replicación Mysql]] | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | In dit artikel, zal de installatie worden gedaan via SSH command line, maar het kan heel goed op uw lokale PC (notepad) en dan worden verzonden via FTP. | ||
| − | 1. | + | 1. In de home directory, download en pakken: |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cd ~; wget http://downloads.wordpress.org/plugin/hyperdb.zip | cd ~; wget http://downloads.wordpress.org/plugin/hyperdb.zip | ||
| Regel 41: | Regel 10: | ||
</syntaxhighlight><br /> | </syntaxhighlight><br /> | ||
| − | + | 2. Kopieer het standaard configuratie bestand naar de root van de site bewerk deze: | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cp ~/hyperdb/db-config.php /var/www/ | cp ~/hyperdb/db-config.php /var/www/ | ||
| Regel 47: | Regel 16: | ||
</syntaxhighlight> <br /> | </syntaxhighlight> <br /> | ||
| − | + | 3. Zoek in het bestand, de volgende passage en vervang DB_HOST door DB_SLAVE_1 | |
| + | |||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
$wpdb->add_database(array( | $wpdb->add_database(array( | ||
| Regel 61: | Regel 31: | ||
</syntaxhighlight> <br /> | </syntaxhighlight> <br /> | ||
| − | 4 | + | 4. Voeg deze regel toe in wp-config.php |
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
define('DB_SLAVE_1', 'IP_du_serveur_mysql_slave'); | define('DB_SLAVE_1', 'IP_du_serveur_mysql_slave'); | ||
</syntaxhighlight> <br /> | </syntaxhighlight> <br /> | ||
| − | 5 | + | 5. Tenslotte: Kopieer het bestand. |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cp ~/hyperdb/db.php /var/www/wp-content/ | cp ~/hyperdb/db.php /var/www/wp-content/ | ||
| Regel 74: | Regel 44: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | Wordpress aanbiedingen nodig? Kijk op de site van Ikoula. [https://express.ikoula.nl/nl/wordpress-hosting Ikoula Wordpress]. | |
| − | [https://express.ikoula. | ||
Versie van 30 nov 2016 19:39
es:Cómo optimizar wordpress con replicación Mysql
In dit artikel, zal de installatie worden gedaan via SSH command line, maar het kan heel goed op uw lokale PC (notepad) en dan worden verzonden via FTP.
1. In de home directory, download en pakken:
cd ~; wget http://downloads.wordpress.org/plugin/hyperdb.zip
sudo apt-get install zip
unzip hyperdb.zip
2. Kopieer het standaard configuratie bestand naar de root van de site bewerk deze:
cp ~/hyperdb/db-config.php /var/www/
vi /var/www/db-config.php
3. Zoek in het bestand, de volgende passage en vervang DB_HOST 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 wp-config.php
define('DB_SLAVE_1', 'IP_du_serveur_mysql_slave');
5. Tenslotte: Kopieer het bestand.
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 aanbiedingen nodig? Kijk op de site van Ikoula. Ikoula Wordpress.
Automatisch bijwerken van reacties inschakelen