Disable Multisite Rewrites

Disable WordPress Multisite rewrites for File Uploads

Author:Jeremy Pry (profile at wordpress.org)
WordPress version required:3.5
WordPress version tested:5.0.21
Plugin version:1.0
Added to WordPress repository:23-02-2014
Last updated:23-10-2018
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:https://github.com/JCPry/disable-multisite-re...
Total downloads:1 077
plugin download
Click to start download

By default, WordPress Multisite uses certain rewrite rules for file uploads. This leads to a URL that doesn’t reflect the exact location of your files on the server. This plugin disables that functionality.

Note: This plugin is extremely simple in purpose. It requires additional setup before it can be used with most Multisite Networks.

If your Multisite was initially created using WordPress 3.5 or later, then you do not need this plugin

Before Use

This plugin is very specific in purpose. In order to use it, you will need to follow some steps first:

  1. Move your images from /wp-content/blogs.dir/SITENUM/files/ to /wp-content/uploads/sites/SITENUM/. SITENUM corresponds to the ID of each of your sub-sites.
  2. Modify the database for each site. I recommend using this awesome script (just don’t forget to delete it when you’re done!). You will need to update the image URLs in the database to replace http://site.example.com/files/ with http://site.example.com/wp-content/uploads/sites/SITENUM/
  3. Clear out the settings for each site for “Upload Path”, “Upload URL Path”, and “File Upload URL”. You can find these settings by going to Network Admin > Sites, then for each individual site, click the “Edit” link, then go to the Settings tab.

FAQ
ChangeLog