Multisite Wordpress: Problem to access secondary site panel

Asked

Viewed 31 times

0

I did an installation of a site using Wordpress using the multsite feature. The installation was ok following all instructions, but every day the URL of a website changes directly in the database, and this makes it difficult to access the panel of this site.

The impression I get is that there is some configuration that always updates at night the field "siteurl" of this site with the domain (without the directory path). Does anyone have any idea how to solve this?

The secondary site is in domain.com.br/English. The content works normally, the problem is only the access to the secondary site panel that insists on going back to the configuration for the root address domain.com.br/wp-admin instead of domain.com.br/English/wp-admin.

Thank you.

  • Very strange this symptom... tried to turn off all plugins? or at least most of them. Can try analyzing the cron Jobs with this plugin WP Crontrol

1 answer

1

Review the following steps:

1- Add the following code to your file wp-config.php in /var/www/html/ above the line: /* That’s all, stop editing! Enjoy publishing. */:

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'dominio.com.br');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

2- Add the following to your file .htaccess in /var/www/html/, replacing other Wordpress rules:

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

3- If everything is correct and has not yet worked, add the following codes to your file wp-config.php in /var/www/html/

define('WP_HOME','http://dominio.com.br');
define('WP_SITEURL','http://dominio.com.br');

Sources: Activating Multisite, Changing Wordpress Site URL

Browser other questions tagged

You are not signed in. Login or sign up in order to post.