Question

Configure wordpress multisite in one click wordpress install

I’m trying to configure multisites on my one-click wordpress installation. The problem I’m finding is: When I add allow multisite to wp-config

/* Multisite */
define('WP_ALLOW_MULTISITE', true);

On network setup I’m getting the message of Subdomain Installation “Because your installation is not new, sites on your WordPress network must use subdomains. The main site of a subdirectory installation needs to use a modified permanent link structure, with the potential to invalidate existing links.”

I don’t want to install others sites in subdomains. How can I configure this?

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

alexdo
Site Moderator
Site Moderator badge
November 22, 2019
Accepted Answer

Hello, @pinheiropt

To have sub-directories structure on old WordPress installation while activating the Network feature, you just need to add the following code in your current theme’s functions.php file.

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

That’s it. Now reload the Network page from Dashboard and you should see option to choose between sub-domain and sub-directory. Once you complete the Network activation process by adding the wp-config.php and htaccess code suggested on next page on Dashboard, you may remove the code from functions.php or even can change the theme template.

I hope this helps. Let me know how it goes.

Regards, Alex

alexdo
Site Moderator
Site Moderator badge
November 22, 2019

Hello, @pinheiropt

I’m glad you’ve sorted this! :)

Regards, Alex

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more