My YunoHost server
Hardware: Raspberry Pi 4 at home
YunoHost version: 4.0.8.2
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen |
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
I would like to change a single wordpress on multisite without breaking the existing one.
I have a single wordpress installed (since first Yunohost version) on a subdomain www.mydomain.tld
. Can I convert the site on multisite without breaking the existing one, keeping the principal site in the path ```www.mydomain.tld`` ?
Here is some files to change, how ?
/var/www/wordpress/wp-config
<?php
// Database
define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'blaBlAblAblAblablaBLa');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
// Keys
define('AUTH_KEY', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('SECURE_AUTH_KEY', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('LOGGED_IN_KEY', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('NONCE_KEY', '1BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('AUTH_SALT', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('SECURE_AUTH_SALT', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('LOGGED_IN_SALT', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('NONCE_SALT', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
// Prefix
$table_prefix = 'wp_';
// Debug mode
define('WP_DEBUG', false);
// Multisite
//--MULTISITE1--define('WP_ALLOW_MULTISITE', true);
//--MULTISITE2--define('MULTISITE', true);
//--MULTISITE2--define('SUBDOMAIN_INSTALL', false);
//--MULTISITE2--define('DOMAIN_CURRENT_SITE', 'www.mydomain.tld');
//--MULTISITE2--define('PATH_CURRENT_SITE', '//');
//--MULTISITE2--define('SITE_ID_CURRENT_SITE', 1);
//--MULTISITE2--define('BLOG_ID_CURRENT_SITE', 1);
// Force https redirect
define('FORCE_SSL_ADMIN', true);
// Auto update
# define('WP_AUTO_UPDATE_CORE', false);
// Path
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
// WordPress settings path
require_once(ABSPATH . 'wp-settings.php');
Also in /var/www/yunohost/settings.yml
line 26, there is
multisite: '0'
Can I keep the direction without subpath like www.mydomain.tld/ for the first multisite blog ?
Can I do manually the changes ?
Or is it better make first a backup and reinstall the wordpress app in multisite mode and use the backup to reinstall the site on the principal site ?
Mon serveur YunoHost
Hardware: Raspberry Pi 4 à la maison
YunoHost version: 4.0.8.2
I have access to my server : Par SSH | Par la webadmin | accès direct via clavier/écran |
Contexte spécial : non
Je voudrai passer d’un simple wordpress à un multisite sans casser l’existant.
J’ai un simple site en wordpress installé (depuis la première version de Yunohost) dans un sous-domaine www.mydomain.tld
. Puis-je le convertir en multisite sans casser l’existant, en gardant l’actuel comme principal dans le chemin ```www.mydomain.tld/`` ?
quelques fichiers à changer, comment (dans quel ordre) ?
/var/www/wordpress/wp-config
<?php
// Database
define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'blaBlAblAblAblablaBLa');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
// Keys
define('AUTH_KEY', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('SECURE_AUTH_KEY', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('LOGGED_IN_KEY', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('NONCE_KEY', '1BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('AUTH_SALT', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('SECURE_AUTH_SALT', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('LOGGED_IN_SALT', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
define('NONCE_SALT', 'BlaBlAblABLabLAblAblAbLaBlAbLaBLABlabla');
// Prefix
$table_prefix = 'wp_';
// Debug mode
define('WP_DEBUG', false);
// Multisite
//--MULTISITE1--define('WP_ALLOW_MULTISITE', true);
//--MULTISITE2--define('MULTISITE', true);
//--MULTISITE2--define('SUBDOMAIN_INSTALL', false);
//--MULTISITE2--define('DOMAIN_CURRENT_SITE', 'www.mydomain.tld');
//--MULTISITE2--define('PATH_CURRENT_SITE', '//');
//--MULTISITE2--define('SITE_ID_CURRENT_SITE', 1);
//--MULTISITE2--define('BLOG_ID_CURRENT_SITE', 1);
// Force https redirect
define('FORCE_SSL_ADMIN', true);
// Auto update
# define('WP_AUTO_UPDATE_CORE', false);
// Path
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
// WordPress settings path
require_once(ABSPATH . 'wp-settings.php');
Il y aussi le fichier /var/www/yunohost/settings.yml
ligne 26, avec ceci
multisite: '0'
Puis-je garder le site principal avec le chemin www.mydomain.tld/ (à la racine de ce sous-domaine) pour le premier site du multisite ?
Puis-je effectuer les changements manuellement ?
Ou est-il préférable effectuer une sauvegarde du site, le désinstaller, puis réinstaller wordpress en mode multisite et rapatrier les données de la sauvegarde ensuite ?