Broken image multisite

After reading several topics about this issue I’ve found this:

Issues with old WPMU installs

If you installed WordPress MU in subfolder/subdirectory (not in root folder on your server >via ftp) and you have problem with image library, where thumbnails and images do not show, >you may need to manually add in rewrite rules for your file directories as follows:

RewriteRule ^([_0-9a-zA-Z-]+/)?siteN/files/(.+) wp-content/blogs.dir/N/files/$2 [L]

Put those below the normal call for uploaded files.

However, this didn’t work, i had to replace (or comment) the uploaded files line and change the new one to work in all sites. In the end this is the .htaccess that worked OK:

# uploaded files
# RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-content/blogs.dir/N/files/$2 [L]

Being ‘N’ the number of my non-primary site

So, I guess that for each site, you have to add another line changing the number.
Hope this helps.

Leave a Comment