admin管理员组

文章数量:1277406

I'm installing Multisite for a fair-sized business, who's WordPress website has been running for around 5 years.

When trying to install it, I am receiving the following warning message:

"Because your installation is not new, the sites in your WordPress network must use sub-domains. The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links."

Sub-domains are not an option for us. The main site is mysite.co.uk, and the websites will be mysite/fr, mysite/pt, etc.

What are my options?

Is there any way around this without causing serious SEO/Google issues, which is what I assume the warning refers to?

Thanks James

I'm installing Multisite for a fair-sized business, who's WordPress website has been running for around 5 years.

When trying to install it, I am receiving the following warning message:

"Because your installation is not new, the sites in your WordPress network must use sub-domains. The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links."

Sub-domains are not an option for us. The main site is mysite.co.uk, and the websites will be mysite/fr, mysite/pt, etc.

What are my options?

Is there any way around this without causing serious SEO/Google issues, which is what I assume the warning refers to?

Thanks James

Share Improve this question asked Feb 8, 2018 at 15:20 iwillbeawebdeveloperiwillbeawebdeveloper 1212 silver badges8 bronze badges 2
  • 2 Consider moving from path-based multisite to the multilingual site. – Max Yudin Commented Feb 8, 2018 at 15:30
  • 4 Rather than converting your existing site, you could create a brand-new WP MultiSite install using subdirectories as you want. Then you would migrate your current site into this new site, test and make sure all is well, then depending on your host either update DNS settings or just swap FTP folder names - as well as use a database migration plugin to set the live domain instead of the test site domain. Usually when you make big changes you want to do it this way anyhow, have a test site where you set up the new stuff so you can make sure it works before it's public. – WebElaine Commented Feb 8, 2018 at 16:53
Add a comment  | 

2 Answers 2

Reset to default 3

Add this to your wp-config.php:

define('ALLOW_SUBDIRECTORY_INSTALL', true);

You should just start with a new install and import the existing site into the new install.

Starting with an existing install triggers that warning but if you start fresh you can setup the subfolder structure.

You can add this to functions.php to allow a subfolder install in multisite:

    add_filter( 'allow_subdirectory_install',
create_function( '', 'return true;' )
);

Untested by me, use at your own risk (test server), and let me know how it works! I am recommending new install and migration as a cleaner solution. Duplicator is pretty simple to import your content.

本文标签: Being Forced To Use SubDomains on Multisite