We have a WP network (with domain mapping) that was started pre WP 3.5, so it was using
wp-content/blogs.dir/ to store media files. I wanted to remove
ms-files.php dependency and after doing some research started the process:
I first tried not moving any files from
uploads/sites/#, but to setup symlinks for that. Then I had some permissions issues so I just copied everything from
Then I cleared the values for
fileupload_url on each site.
And finally updated/inserted
ms_files_rewriting = 0 in the
Also added some rewrite rules to the
.htaccess file to not have to deal with updating all URLs in DB.
The main blog id in our setup is 2 and not the default which is 1:
As far as I know, and based on what I see in
wp_upload_dir(), WP uses the root of the
uploads folder for the main blog contents and
uploads/sites/# for other blogs. So I have copied the content from
blogs.dir/2/files to the root of the
uploads folder and NOT to
Now here is the issue for media files on the MAIN BLOG: in the back-end, WP loads files from the
uploads folder which is fine, but on the front-end it tries to load files from
uploads/sites/2 which doesn't exist and is weird!
PS: I can just add another rewrite rule to have this fixed, but I really want to know what the reason is for
/sites/2 being added for the main blog.