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.

  • 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

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.