When upgrading some WordPress Network (Multisite), I noticed images on some sites completely disappeared. You only get a broken image icon in place of where the image used to be. This says you can’t actually access the image through the path, the URL address, to the image.
I checked that the images are still on my server.
Images on the server should be located in
/wp-content/blogs.dir/(blog number i.e. 1, 2, 3...)/files
Images were there. All Good.
So the issue is the address, not the actual images.
Solution
WordPress Multisite Networks do some address rerouting through the .htaccess
file in the directory where you have WordPress installed on your server. You may remember having to edit the .htaccess
file when first installing Multisite. Apparently, in the upgrade the .htaccess
file needs to be changed as well. So
- In WordPress Network Admin, go to Settings > Network Setup
- Find the upgraded .htaccess code on that page, step #3. Follow the directions (as you did when first installing a WordPress Multisite Network). It will ask you to edit your current .htaccess file by pasting in the new .htaccess code.
For me (BUT NOT NECESSARILY FOR YOU!! CHECK YOUR OWN INSTALLATION), this was the code. Use this as a reference for what you want to look for:
# uploaded files RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -dRewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteRule ^ - [L]
RewriteRule . index.php [L]
Continue Building Your Personal Brand with Our Best Tips. FREE.
Join our free newsletter for our best tips and strategies to become a superstar online. Whether if you're a blogger, coach, musician, or youtuber, you can take charge of your dreams. Use our insights and gems from years of consulting clients, corporations & celebrities.