I have just reinstalled a fresh version of WordPress (4.6.1) on a multisite (network) install after my website was compromised. Luckily, I had a backup from a few months ago lying around thanks to the UpdraftPlus plugin, so I restored my site that way.
Everything worked but the media library.
The pictures are present in the proper directory, which is
where blog_no is the number that WordPress associates with every site in the network.
The media library entries are all present, but the thumbnail is blank:
If I try to access the file URL, I get a 404. Any new picture I try to upload does the same.
Here is what I have tried:
- Changing the upload directory in each site's settings in my Admin dashboard. I figured I could just re-upload all the files manually. The files did not end up in the correct directory, I couldn't find them anywhere and their thumbnails were blank.
Moving the media files from
to /uploads/sites/[blog_no]/files/YYYY/MM/ like suggested here, figuring that maybe since I was restoring what is probably a pre-3.5 site, it could be a directory structure problem. Didn't change a thing.
Now, since this is a new install, I had to reset the .htaccess file because it wasn't backed up. I am thinking that there was probably a RewriteRule in the old .htaccess that converted the file URLs to actual directory paths, but I don't know a thing about Apache and I'm worried that I'll break something if I play with RewriteRules by myself.
The file URL format is this one:
What should I do?