C4f1151075b447779af31e99d6cf70e2c6eb47ac
By:
newbie

Some help required on wordpress multi-site with Nginx

November 5, 2016 112 views
WordPress Nginx Ubuntu 16.04

Hello,
im trying to achieve the following

main wordpress installation for mysite1.com
2nd site using WP multi-site(sub-directory) mysite.com/abc
3rd site using WP multi-site (domain maping) anothersite.com

all 3 above with 1 single wordpress installation. i checked couple of tutorials but a bit confused that wordpress sub-directory and custom domain can be installed in single wordpress or not.

some detailed instruction would be appreciated.
thank you.

1 Answer

Hello.
I hope I'm not too late. But, I have bad news for you. :(

This is not possible with one WP installation. This is a quote from WP Codex - Create A Network:

You must choose one or the other. You can reconfigure your network to use the other choice after installation, despite the advice on the screen, but reconfiguring it might not be easy.

I've setup one Droplet with it and verified that it's no possible to do it.
Codex: Before You Create A Network
Codex: Create A Network.

I'm not sure that you would be able to setup as you want. You would be able to setup first and second site, but I'm not sure that third is supported by Multisite.
Multisite supports sub-directory or sub-domain:
e.g. for sub-directory: example.com & example.com/blog
e.g. for sub-domain: example.com & blog.example.com
But there isn't option for: example.com & example.org
Maybe it's possible to tweak but as I said I'm not sure in it.

You can always go with multiple sites, it could be even easier in your case

  • really appreciate your reply here brother.

    i just found this tutorial
    How To Set Up WordPress Multisite with Nginx on Ubuntu 14.04

    i can tell you i achieved my purpose or not only after i try it. hopefully ill try with this tomorrow or day after tomorrow. though this tutorial is for sub-domain but i think i can make it work for sub-directory with following rewrite rule

     if (!-e $request_filename) {
            rewrite /wp-admin$ $scheme://$host$uri/ permanent;  
            rewrite ^(/[^/]+)?(/wp-.*) $2 last;                     
            rewrite ^(/[^/]+)?(/.*\.php) $2 last;                   
        }
    

    i will only map 2nd domain for the 3rd site. first and second site will be mapped with 1st domain.

    what do you think? this will gonna work?

    by Jesin A
    This tutorial will show you how to set up WordPress Multisite with subdomains on an Nginx web server. This allows you to run multiple unrelated websites, with their own domains, from a single WordPress admin panel.
    • @xMudrii
      hello bro,
      it did worked. i managed to do what i was looking for. but theres some issues.

      everything working perfectly but when i try to change tagline or permalink of my site 2 & 3 it dont allow me.
      secondly, from the main site, example.com/wp-admin i cant find domain menu under tools but from 2nd & 3rd site i can find them. is it normal?
      lastly is there any way to disable network menu for the 3rd site? so that from that sites wp-admin only can manage that sites settings and not see entire network.

      thanks in advance.

Have another answer? Share your knowledge.