1

I currently have three independent WordPress blogs hosted on a single shared server.

The main domain (we'll call domain-A is sitting in the public_html folder. domain-B and domain-C are separate WP installs residing as subfolders within public_html. Each of the installs is mapped to its own, unique URL.

Here's the structure of the server:

/public_html
    ..core WP files, etc
    /domain-B
        ...WP install core files
    /domain-C
        ...WP core...

I am attempting to set up a WP multisite, incorporating all 3 blogs under domain-A as my main parent site.

My plan is to create the multisite in another subfolder in public_html and once the site is configured, I want to seamlessly - with minimal downtime - swap out the independent sites for the one multisite.

How would I do that?

Here's what the new server config might look like:

/public_html
    ..core WP files, etc
    /domain-B
        ...WP install core files
    /domain-C
        ...WP core...
    /new_multisite

Ideally, it would be great if I just had one wp multisite install in the root folder and could remove the other independent installs, e.g:

/public_html
    ... wp multisite core files, etc..

I read some stuff about configuring my local hosts file on my system to be able to re-route the IP address to a domain URL (still a little fuzzy on some of the details of that) but I don't see how that helps with a live site and/or a remote server.

Also, is it safe to create a "sandbox" site in a subfolder on the shared server? How can I keep this folder undiscovered or inaccessible? I am considering doing the setup on my local computer using WAMP as a dry run but I'll still have to contend with uploading it to the live server, testing it, then making the switch from 3 independent blogs to one multisite.

Edit: I'm learning now that .htaccess can be used to control redirects to a subdomain, so theoretically, all requests to the original domain(s) can be redirected to sites/domains within the multisite. Obviously, the specifics of this starts to get a little hairy.

Thanks in advance,

3
  • Why do you think you need to redirect? Domain B will still be Domain B, all you would have to do is change the document root for that to public_html
    – Steve
    Sep 18, 2020 at 1:10
  • I don't think my question was clear enough. It's not the issue of setting up the multisite network. The issue is making the transition from the current set up to the new multisite setup once it's complete. More specifically, finding out the nuts and bolts of doing that on a server (DNS, IP, domain mapping, etc..). That's where I get tripped up. Should I edit this question or ask a new one? Sep 19, 2020 at 18:11
  • Since you say they are all on a single server, there is no impact on DNS or IP and domain mapping is irrelevant. You are overthinking this.
    – Steve
    Sep 20, 2020 at 1:16

1 Answer 1

1

A search revealed a number of resources for doing this. It seems like it isn't a trivial task.

Firstly, you need to convert your site to a multisite install.

Open the file wp-config.php, which is is located in the main directory of your WordPress, and add the line

define('WP_ALLOW_MULTISITE', true);

above the line:

/* That's all, stop editing! Happy blogging. */

In the left sidebar under Tools you will find the menu tab Network Setup, where you can configure your WordPress Multisite.

Decide whether you want to use subdomains for the sites in your network (e.g. site1.example.com) or whether you want to have them installed in subfolders (e.g. example.com/site1). This setting affects all the sites in your network, you cannot change that later on. Do you need a site to be mapped to a top level domain (e.g. example.com)? This is possible with domain mapping.

Enter a name for your network in the field Network Title in the section Network Details.

Enter the site admin’s e-mail address.

Click the Install button.

Keep following the instructions at

https://multilingualpress.org/docs/how-to-install-wordpress-multisite/

Once you have done all that, follow the instructions here. https://guides.wp-bullet.com/convert-wordpress-single-site-multisite-subsite-wp-cli-bash/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.