• Hello, longtime WP user here who is configuring a multisite for the first-time. I started from an existing site and set up the multisite as a subdirectory network.

    So I have:
    Main(existing) site – at {rootdomain.com}
    Additional sites – at {rootdomain.com}/{subdir}

    What I want to do is now also assign a {subdir} of my choosing to the main site (the existing site I started with before activating multisite). The reason for this is because that site already has a configured theme, some paid plugins, and some complex forms built in one of the paid plugins. I’d rather not have to try to manually migrate all of that to a new site in the network and rebuild, retest, etc. the forms, just to get it to a {subdir} url.

    Is there a reliable way to be able to switch the main site to use a {subdir} like when you are creating new sites in the network? Or alternately, is there a reliable way to migrate content (including plugins and their data – in my case, these complex forms I’ve built in a paid forms plugin) from the main site to a new site in the network so I can have that {subdir} on it?

    Thanks in advance!

    ETA: I’m comfortable with making changes in wp-config as well as phpMyAdmin but do not want to do anything that would break / have to be repeated every time WordPress updates.

    • This topic was modified 8 months, 3 weeks ago by 83steps. Reason: Clarifications about editing wp-config, phpMyAdmin, etc
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    To have the main site in a subdirectory, you’d need to move the entire network into a server subdirectory. Then all subsites would also have this subdirectory in their URLs, for example: example.com/main-sub/site-sub/. All existing permalinks in your DB would need to be updated accordingly. It’s nearly as much work as moving the site to a new server.

    It might be feasible to use a symlink instead, but I’m not confident a network would work correctly.

    I’m not following your reasoning for wanting to do this. It’s probably unwarranted, your old site and its content should continue to work as it always had as a network main site. In any case, if your preferred theme and plugins are all network activated, any subsite should be able to use the same theme and plugins.

    Of course, any existing form configuration would need to be re-created in a new site. But if you can determine how the plugin saves an existing form in your DB, you could export/import the data into a subsite’s table. Use phpMyAdmin to do so. It may be a good idea to first create a very basic new form in the new site so any necessary post types or whatever are already in place.

Viewing 1 replies (of 1 total)

The topic ‘Give the main site a subdirectory URL’ is closed to new replies.