Installing wordpress multi-site on new version of wordpress

Posted May 11, 2017 3.7k views
NginxWordPressUbuntu 16.04

i know u posted a comment on my earlier post, but dont for some reason i cant see that comment. i also tried to copy the link from your profile but no luck.

now i have wordpress multi-site on subdomain. completely working so far. and i uploaded an image for test on my new site, and found that blogs.dir is now sites inside wp-content/uploads

now my question is, from wordpress codex, these seems pretty important if you are concern about performance.

map $http_host $blogid {
        default               0;           1;     2;

        location ~ ^/files/(.*)$ {
                try_files /wp-content/upload/sites/$blogid/$uri /wp-includes/ms-files.php?file=$1;
                access_log off; log_not_found off;

        location ^~ /sites {
                alias /var/www/novoapp/html/wp-content/sites;
                access_log off; log_not_found off;

        location ~* /(?:uploads|files)/.*\.php$ {
                deny all;

as you can see, i changed blogs.dir folder name and location accurately but my question is, does all these still required? or im just wasting time on some deprecated stuffs here.

by the way, i also removed following lines from server block as im not on sub-directory anymore. i hope that ok.

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

and thanks a lot my friend for all the help. you are really amazing.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


It’s slightly odd as I can’t see my response either :-).

The main part of the reply is that on newer installations, blogs.dir does not exist and WordPress now uses /wp-content/uploads.

This happened as of v3.5, so any installation turned network on 4.x won’t use or have blogs.dir, so any rewrites targeting that directory won’t work either. From the looks of it, that page needs updating so that the new setup matches their guide.

In terms of performance, I’ve never noticed a performance hit without mapping.

When testing the site I setup to confirm the previous rewrites, load times were 0.7-1.0s from a location in Canada to the Droplet in New York. That seems pretty much in-line with what I expect to see on a default setup.

With a theme that doesn’t have such a huge header for a background, and was actually utilizing caching where possible, those load times should match or be lower depending on what else is running (i.e. plugins).

Honestly, if it’s working without the added bulk, keep it clean and don’t worry about them. Your time would be far better spent optimizing elsewhere (i.e. the stack) as opposed to worrying about the map or mapping aspect.

  • @jtittle bro,
    the purpose of my second site installation was to have a knowledgebase & public forum. i have my knowledgebase & forum on my second site but i got another issue.

    its new user registration.
    first of all, the only place i found for user registration related stud is under
    Network admin
    Setting > Network settings.

    is that the only place where i can allow only regular user access who will be posing in my forum?

    If yes, then we will follow along
    inside that panel, there is “Registration Settings”

    Options are

    1. Registration is disabled.
    2. User accounts may be registered.
    3. Logged in users may register new sites.
    4. Both sites and user accounts can be registered.

    i believe option 2 should be selected for regular user registration. please correct me if im wrong.

    now, if the registration is allowed, there’s another problem. when i click login from my second site, login page is on

    but when i register, then registration page is on my main domain

    is that normal?

    • @newbie

      Since WordPress doesn’t install a full instance of WordPress for each site you deploy, and each site in the network uses the same core, IIRC, that’s normal. That may differ if you’re using domain mapping (mapping actual domains to sub-domains / sub-directories), but if your simply registering new accounts on a network site, there’s only one signup file for WordPress, thus only one place to go.

      As far as registration in general, if you don’t want users to be allowed to create network sites, then yes, option two should be the one you use. Both 3 and 4 will allow others to create network sites, not just accounts.