Multisite WordPress on a site that is more than 30 days old

Question

Hoping to help others with this ticket as well I explain the process I followed to enable WordPress multisite on a site that is more than 30 days old and therefore displays the following message when creating the network:

“Because your installation is not new, sites in your WordPress network must use subdomains. The main site in a subdirectory installation will need to use a modified permalink structure, potentially breaking existing links.”

I have the following code on the wp-config.php file:

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
define( 'DOMAIN_CURRENT_SITE', 'sos-wp.it' );
define( 'PATH_CURRENT_SITE', "https://wordpress.stackexchange.com/" );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
/* That's all, stop editing! Happy publishing. */

And the following code in the .htaccess file:

# BEGIN WordPress Multisite
# Using subfolder network type: https://wordpress.org/support/article/htaccess/#multisite
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]

# END WordPress Multisite

Now everything seems to work correctly and I can create new sites under the multisite, but the problem is that since the subfolders for the site /go/ and /account/ already exist, they can’t be created correctly. What can I do? What is the procedure to follow?

0
Matteo Feduzi 1 week 2022-01-11T02:02:24-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse