Question

Installing wordpress multi-site on new version of wordpress

@jtittle 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.

anyways, 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;
        www.mysite.com           1;
        subdomain.mysite.com     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 {
                internal;
                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.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Accepted Answer

@newbie

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.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.