zhaoJian's Tech Notes

Solution for WordPress Uploaded Images Not Displaying

Technology ~816 words · 3 min read - views

This problem occurs on Linux servers. My blog had this problem before, but I couldn’t remember how I fixed it. Problem description: Images uploaded through the backend show X, directly accessing the image URL shows 403, checking the attributes shows 600. Changing the image attributes to 604 allows it to display correctly, but this only treats the symptoms, not the root cause.

Today I finally found the solution - change the uploads folder under /wp-content/ to 755 permissions and it’s done!

Of course, this problem isn’t common, because the common saying online is that many file permissions on Linux must be changed to 777, but this has major security risks. So we recommend users set folder permissions to 711, file permissions to 604, and folder permissions up to 755 maximum for everything to run normally.

Share:

Comments