Multisite upload support

Is it just me or does trellis/bedrock not support multisite uploads?

I had to add this to my nginx config:

  #WPMU Files
  location ~ ^/files/(.*)$ {
    try_files /wp-content/blogs.dir/$blogid/$uri /wp-includes/ms-files.php?file=$1 ;
    access_log off;
    log_not_found off;
    expires max;
  }

  #WPMU x-sendfile to avoid php readfile()
  location ^~ /blogs.dir {
    internal;
    alias {{ www_root }}/{{ item.key }}/{{ item.value.shared_path | default('shared') }}/blogs.dir;
    access_log off;
    log_not_found off;
    expires max;
  }

Am I missing something?

It appears you have a rather old multisite project you’re attempting to migrate to Trellis. Anything after 3.5 uses the standard WP upload directory now:

https://updraftplus.com/faqs/i-am-restoring-a-pre-wordpress-3-5-multisite-into-a-3-5-or-later-multisite-what-happened-to-my-blogs-dir/?utm_referrer=https%3A%2F%2Fwww.google.com%2F

1 Like

Ah yes, that’s it. Unfortunately I have some legacy URLs I need to support. But I was able to get it working by tweaking the nginx config some.

Thanks for the perspective!