2

Currently I have a WordPress blog with one domain as following:

http://example.com/blog

All WordPress files are under blog directory.

Now I want to create another site using WordPress Multisites feature.

The second site will be as following:

http://example-2.com/blog

Both domains are pointing to the same root directory therefore both domains have access to the same blog directory.

I have tried to use this plugin WordPress MU Domain Mapping it didn't work because current installation of WordPress is under /blog/

Here is the warning I'm getting:

Warning! This plugin will only work if WordPress is installed in the root directory of your webserver. It is currently installed in ’/blog/’.

Does anyone have any other suggestions?

Thank you.

4

You don't need domain mapping in current versions of WP, it's built in.

You just need to edit the site Settings (under Network Admin, Sites, click on site then Edit). Enter the URL for the site (https://www.example.com or whatever). If you need to, use the Settings tab when editing the site and change all references to the correct domain name.

See also my answer here: Wordpress multisite with different domain

Added (by request)

When creating a multisite sub-site that will have it's own domain, I always create the site first. On the Network Admin, Sites, Add Sites screen, the URL will be https://www.example.com/subsite3 , where you enter 'subsite3' as the 'site address (URL)'.

Once you have set up the site (and registered the domain name, and set the domain's nameservers as required), then you can go into the Site Settings (Network Admin, Sites, edit the site) and change the URL on the Edit Site, Info tab to the actual domain name (https://www.newsite.com ).

I also go into the Settings tab on that screen and change the "SiteUrl" and "Home" settings if needed. And since some plugins may have your site URL (the original value you entered when creating the site), I always go through all the settings and change any URLs as needed in there.

Then, a test of all site pages (admin and actual site) to make sure they work correctly. I then configure plugins on the site as needed, then go back into the Settings tab (on the Network Admin, Site, edit screen) and make sure the new domain value is in all of the settings location.

Since WP 4.9x supports domain mapping (since 4.5?), there is no need for domain mapping plugins.

| improve this answer | |
  • Thanks for your answer. I was able to solve it based on your answer but honestly its still confusing specially when adding new site. Could you edit your answer to mention that admin user should add a site first then edit the site url to the chosen domain. After you edit your answer I will mark it as correct. Thank you – Aboodred1 Nov 12 '18 at 17:09
  • I'm having lots of issues trying to set this up and I can't seem to find this anywhere - do I need to fully install wordpress on the second site before linking it to my first one? I have gone through the steps of creating the network, adding my second site, updating the URL, but the site doesn't have wp installed and when I look at the uploads of the initial site, I don't see it broken into /sites like I should – Manly Sep 9 at 2:20
  • You install WP as the 'master' site (site 0). Then use the Network Admin area (different from Site Admin) to create a new site (site 1). There is not a separate WP install for Site 1, just more tables in the main site 0 database to support site 1. Each site can have it's own theme. Plugins are installed from the Network admin page, and then enabled in each Site. There are many googles/bings/ducks on how to set up a WP Multisite installation. Note that there will be a number of tables (10? I forget) created for each sub-site, so your db hosting has to be able to handle large tables in a DB. – Rick Hellewell Sep 9 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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