Wordpress image upload displays 403 error. Links are broken

Avatar
  • Answered
Hi

I have an issue when uploading images to my WordPress site. Everytime I try to upload an image it appears as a broken link, and when I try to manually type the image address I get this:

Error 403 - Forbidden
You don't have permission to access the requested resource. Please contact the web site owner for further assistance.

I've made contact the online chat support, and it seems to be a permissions issue because they do some king of permission fix and the problem is gone. The thing is that the problem appears again in a couple of hours. And it's really annoying to ask for a fix every day.
Does anybody have any clue?
FYI, I've set up a subdomain on my web in order to serve content. I've followed this tutorial: https://surpriseazwebservices.com/serve-images-from-sub-domain-in-wordpress/
And I also have cloudflare, in case this is importan information.

Thanks a lot.
Avatar
Arn
Hello Littlebytes, Apologies for the problem with the images not showing in your gallery. We would need more information in order to assess the issue you're having. Please provide a URL for the site affected by the issue as well as all the steps you're taking that are leading to the problem so that we can attempt to duplicate the issue. If you wish to handle the issue privately, then please contact our live technical support team via chat/email/phone. They are available 24/7 and their contact information is at the bottom of this page.
Avatar
johnpaulb-imhs1
Hello, Thank you for contacting us about 403 errors with images after uploading. 403 errors are usually caused by incorrect file permissions. You'll want to make sure that your folders have permissions of 755 and your files have permissions of 644. It could be that when you upload the image files that one of them was set not using 755 / 644. If it is a file permissions issue, or even it if it isn't, the error log section of your cPanel may give you more details of what is causing the problem. For example, 403 forbidden error is very vague, the error log may tell you which file has incorrect permissions. The following tutorial has more information about the error log in cPanel: How to view cPanel Error logs If the problem is file permissions, you can follow the steps in the below article to learn how to modify your file permissions: How to change file permissions within cPanel Since you are not serving the images directly from the site, but from a subdomain via cloudflare, you will have to check the file permissions there. Also, since cloudflare can be setup to cache file, it may not be caching immediately. You will want to check your setting in this regard. If you have any further questions, feel free to post them below. Thank you, John-Paul B