• Resolved talie02

    (@talie02)


    Hi All,

    My client’s websites are currently setup up as WordPress multisite using subdirectories for subsites. The primary website and subsite URLs are accessed using the format:

    https://domainname-primary-site/
    https://domainname-primary-site/subsite1
    https://domainname-primary-site/subsite2
    https://domainname-primary-site/subsite3

    The client has had another firm develop a new primary website. This new site will be installed as a standalone website, but still using the existing Primary URL (i.e. outside of WordPress but still on the same server).

    All the subsites will be remaining in the existing WordPress multisite installation. They need to continue using their existing URLs (as shown above).

    If the primary domain url points to the new standalone website, how/what do I need to set up on the server to point requests to the subsites to the correct place?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Very interesting question. I’m not sure whether this can be done exactly in the way you want, but there are some alternatives and possible approaches.

    The very easiest solution is not exactly what you asked for: put the new primary website at another subdomain or domain/TLD (i.e. .info instead of .com), and add a redirection from only the homepage of the old multisite to the new primary website. But it’s not optimal for SEO having a redirection at the first homepage level, and may also mess up the branding in some other ways.

    The next easiest solution would be moving/renaming the multisite to a subdomain (it’s not that easy, but still easier than your wanted solution), and adding some redirects for /subsite1 + 2 + 3 on the primary website. Still not exactly what you asked for.

    Another solution is transforming all subsites into individual WP installations, in server subdirectories of the primary website, matching the paths /subsite1 + 2 + 3. There some tools out there for such a task, like Duplicator Pro. Problematic if you need the users to be kept logged in on more than one subsite, maybe with the plugin “WP Remote Users Sync”. And its more work to update them all, maybe use “MainWP” or another central administration tool for multiple installations.

    Your wanted solution requires the multisite to be moved to a server subdirectory of the new primary website under domainname-primary-site/multisite-main (or whatever you like as path for the multisites main site, which now has no other content or function beneath beeing the multisites main site), and adjusting the subsites urls paths and cookie paths in the database and config file, and maybe also some adjustments in the .htaccess of the primary website.
    This may be an approach: https://wordpress.stackexchange.com/questions/119493/multisite-in-subfolder-how-to-make-new-sites-to-be-in-same-level-subfolders-as
    Tricky – if you want to do it manually, I recommend to exercise it on a copy of the multisite or at least an independent test installation.

    Or if you use NGINX, you may use path-based routing to keep the new primary website and the old multisite devided. But you still have to move the multisite’s main site out of the path from the primary website…

    Thread Starter talie02

    (@talie02)

    Thanks, cyrfer for your suggestions.

    Changing the primary domain/subdomain is definitely not an option.

    So it seems like individual WP installations for each subsite might be the way to go. There’s already one working, non-WP website sitting in a subdirectory of the top-level WP installation – what’s a few more…

    The main and subsites can then stay at the original URLs – even if the main website is no longer in WP. Though may need to set up some rules in the htaccess file. It will depend on how the other developers install the new website.

    And as none of the subsites allow user sign-ups, keeping a user logged in across multiple sites is not an issue.

    The only issue I can foresee is if the other developers have reused the same directory names as the existing subsites on the primary site! (I wouldn’t put it past them since – I’ve not been asked to provide any input to the new site and I don’t know how vigilant they are about checking *sorry, rant over*.)

    I have a local development copy of the setup to play with – although it will never be as good as the production server.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.