-1

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

/blogs.dir/[blog_no]/files/YYYY/MM/

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:

enter image description here

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:

  1. 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.
  2. Moving the media files from

    /blogs.dir/[blog_no]/files/YYYY/MM/
    

    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:

http://subdomain.domain.com/files/YYYY/MM/filename.png

What should I do?

-1

You are on right track buddy.

Now do this.

3. Install plugin called regen thumbnails . Run regen thumbnail. It will take few minutes but after finishing process, you will have all the images in the media library. This plugin basically regenerate all the thumbnail in the media library for all the sizes. Becuase you had very old WordPress. It makes sense directory structure changed since. Try this and I hope it will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.