Select Page

Today one of our client wanted to setup worpdress multisite network. They tried to create the network by themselves but failed ( its sometimes confusing ). So we created a backup of their website using a plugin named duplicator pro and we installed the backup on our own server.

As next step, i disabled all their plugins and added the following code in wp-config.php file as suggested on wordpress codex.

then i logged in wordpress admin area and went to Tools > network setup to create the network. According to our clients requirement we need to create network in sub directories. But wordpress was showing me the following message.

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

So i started to google to figure out how to solve the issue and as always google solved my problem. All i need to do is add the following code in my themes functions.php file.

and it will just force wordpress to allow me create the network using subdirectories. If you are seeing the same issue. Just add the code to your themes function.php file and you will see the option to choose between sub domain and sub directories.

Once done with setting up the network, remove the code from themes function.php file and enjoy.