• Resolved Paya Pets

    (@pmrvkr)


    Hi,

    Website is updated, my plugins are also updated, my theme is updated.

    2 days ago i was uploading images to my website and creating posts with images from media library with zero issues, today i went on my website and 2/3 of my media library images dont display (image below):

    When i click show media file i get a 404:

    As an example, this is the link for a missing file:

    https://websitex.com/wp-content/uploads/2021/02/Malha-macia-arn-s-de-c-o-e-trela-conjunto-reflexivo-respir-vel-n-ilon-c-1.webp

    Maybe the wp-content/uploads/ link is broken, i dont know.

    Removed the option from settings-media-uploading files for uploaded images to be grouped into year/month, but it didnt work.

    Repaired MySQL database in cPanel. Didnt work.

    Every new image i upload has the same issue of being uploaded but then not showing/missing.

    In another post on this forum with the same issue, someone said to rename the upload folder in the PHP file but i kinda dont wanna do it unless its the fix.

    Hope i provided enough info on the matter for someone to help with the issue.

    thanks

    The page I need help with: [log in to see the link]

Viewing 12 replies - 16 through 27 (of 27 total)
  • @libertycap1968 I have found a cure that works.

    revert word press back to an old backup and then update it again to the latest version.

    This worked a treat. Hope this helps anyone else with the same issue.

    @loid45 I did try your method but unfortunately it did not work for me.

    Thank you I will try this !

    Removing .htaccesss file from wp-content/uploads solved my problem.

    Thanks @varunvaze ??

    if you encounter missing images on the site and the images are present on the hosting but if you try to access one of those images directly you get a 404, check the wp-content/uploads folder for an .htaccess file with permissions set to 600. If you have it, change permission to 644 and it should resolve the issue.

    • This reply was modified 6 months, 2 weeks ago by dp667.

    This happened on a site prior to the 6.5.3 update for me. Oddly the .htaccess file in /upoads/ had been modified this morning. It had:

    <Files *.php>
    deny from all
    </Files>
    
    

    Which I thought “sounds like it is blocking PHP files”, but apparently is blocking ALL files for some reason? Or maybe not. This is cheap GoDaddy hosting we are using in this particular situation, so it could be something weird there, maybe it skipped a line. Or maybe it is Solid Security, sometimes it messes around with htaccess files.

    Anyway, after removing that, the images load just fine. I will have to look into it a little further, because it is a good idea to deny access to any php files in the /uploads folder, that is for sure.

    Also experienced the same problem without updating to 6.5.3, only varunvaze’s suggestion to remove the wp-content/uploads/.htaccess (note, NOT the top level .htaccess) worked for me: https://www.ads-software.com/support/topic/missing-media-after-update-to-6-5-3/#post-17746552

    I should mention that I don’t know the long term consequences of deleting so beware. Even knowing what that file is intended to do I have no idea why it would cause this issue or break things for people across hosting providers and WP versions at seemingly the same time.

    @bkjproductions I also experienced this while being hosted on cheap godaddy hosting.

    PHP did publish a patch version bump yesterday which feels too uncanny to be a coincidence, though looking at the changeset I can’t see a direct correlation: https://www.php.net/ChangeLog-8.php

    the code added in the .htaccess file in the uploads folder:

    <Files *.php>
    deny from all
    </Files>

    in itself isn’t causing the issue. This can be a good security measure, blocking access to PHP files in your uploads folder.

    the issue here is the permissions on that .htaccess file, if they are set to 600, apache triggers an error when accessing the uploads folder as it is trying to read .htaccess and it can’t due to the permissions being set to 600.

    if the file only contains the code mentioned above, and permissions are set to 600, just change them to 644 and it should resolve the issue with your images not loading while still blocking PHP files in the uploads folder which is a good security measure.

    • This reply was modified 6 months, 2 weeks ago by dp667.

    Save permalinks twice after deleting .htaccess and you should be fine.

    @pmrvkr See https://status.godaddy.com/. This is an open known issue. This is expect this conclude soon. As this is a hosting provider issue, please do open issues with your host.

    @dp667 is totally correct, the permissions issue! Just tested and chmod 644 does the trick. I wonder if GD just deployed an .htaccess file across the board for everyone, forgetting to give it proper permissions?

    Ran into this bug and had the issue across multiple sites. Permissions were 644 on all. Renaming -old fixed the issue on all sites.

Viewing 12 replies - 16 through 27 (of 27 total)
  • You must be logged in to reply to this topic.