Share This Post

After upgrading a few plugins and the core WordPress files on a clients website, access to the uploaded images had been removed. Rather than showing uploaded images the screen would have the alt text in its place. When the image in question was displayed by its self in the browser, the message

Forbidden

you don’t have permission to access …(image file)…. on this server

Quickly investigating the file structure showed a htaccess file in the uploads folder. In this htaccess file was

deny from all

Seeing how that is too strict for our purposes, we would like users to be able to view images when coming to the site, I utilized the code shared by Tom Oliver in his protecting uploads with htaccess. By replacing the deny from all code with the code Tom provided in his post, security of the uploads folder was maintained while still providing access to the images.

A simpler and less secure solution would have been to simply rewrite the .htaccess as:

allow from all

More To Explore

Boise Web logo

Do you want to boost your business?

Our goal is to see other small businesses succeed! We would love to be part of your journey.