WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an image that I've uploaded through the WP media library. I can see this image in my uploads folder via ssh/ftp. I cannot see this image if I put the URL in my browser, like www.site.com/files/image.jpg (It's a multisite and all uploads go into individual folders rather than be separated out by months).

In WP, the image shows as broken in the media library listing of uploaded files. Only when I select this image file and choose "edit image" does the image show up.

The 404 is not the regular WP 404 page template, it's a blank page that only says "404 — File not found."

And the best part is that this does not happen for all images/uploads.

Does anyone have any ideas I can take action on?

EDIT: It looks like any file with "pdf" in the file NAME (not file extension) is having this problem. .pdf files work fine. I don't know why the filename would make this happen...

share|improve this question
The fact that you get a generic 404 makes me think there is a serious server issue/error before WordPress even gets involved. Check your server logs and see if the shed any light. – s_ha_dum Jan 31 '13 at 15:18
up vote 0 down vote accepted

It turned out to be an .htaccess rule put in by a coworker. It was supposed to target just some .pdf files but the rule wasn't written strict enough.

So that was a fun few hours spent on wild goose chases.

share|improve this answer

Also happened to me, because of mod_expires.c

The rules were causing the 404, but the files were OK on FTP:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access 1 week"
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/png "access 1 week"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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