I have a multisite that was set up on WordPress 3.4. That means that uploads for sub-sites are stored in wp-content/blogs.dir/{blog_id}/files
and are served through ms-files.php.
In WordPress 3.5, ms-files.php was disbanded completely for new installs and uploads are stored and accessed at wp-content/uploads/sites/{blog_id}
.
Is there anyway I can switch my install from the pre-3.5 way of serving/uploading files to the new way? I would like to continue serving uploads through files/
for current blogs, if possible.
In theory:
- Move images from blogs.dir/SITENUM/files/ to /uploads/SITENUM/ (or make an alias)
- Edit all sites so they don’t look in /files/ but in /uploads/SITENUM/
- .htaccess, remove the ms-files.php line
- Search/replace each posts table for each site, changing /files/ to /uploads/SITENUM/
A walk-through can be found here (dumping ms-files), this is not a trivial hack! It involves command-line usage, sql, and using a mu-plugin.
Resources
- wp.org/support/removing-ms-filesphp-after-upgrading-existing-multisite-to-35
- wp.org/support/remove-ms-files-rewriting
- Dumping ms-files