1

I am trying to upload images into the media manager of a Wordpress website for my clients. No issues last time I touched this website, which was about a month ago.

Media Library on WP

So far, I have:

  • Tried uploading images that are already in the media manager (same size, file, etc)
  • checked all permissions in the FTP (all permissions are fine)
  • disabled each plugin, 1 by 1, until all were disabled to test if that was the issue (it wasn't)
  • uploaded an image directly into the FTP to get it to appear (it didn't)
  • reset the upload location for the media manager (thought that was the issue, but it wasn't. More on that below)
  • made a lot of grumpy noises
  • tried uploading different files (didn't work)
  • Reinstalled the latest update of WP

So far, here's what I know:

  • When I click "edit image" the image appears in the editor
  • In the FTP, when I upload the image, it appears in the appropriate folder (public_html/wp-content/uploads/2021/11)
  • when I access the image from the FTP, it is there in all dimensions as created by WP
  • The URL of http(s)://company.com/wp-content/uploads/2021/11/name.jpg brings me to a blank page
  • No errors are returning in console expect that there is a missing resource
  • It's even worse on Safari (as opposed to Chrome), where none of my images are appearing

So far, every answer I can find for this problem involves the permissions for the files, none of which seem to affect anything for me. The files upload automatically at a 644 permission level, though I can change them to a 744 and still get nothing.

None of my images show in safari Only error in console When I click on the blank image upload When I click Edit on the image while it is selected The image when accessed from the FTP All images in the FTP

SOS and thanks for any help!

Sydney
  • 35
  • 1
  • 8
  • 1
    Are there any JS errors in the inspector? – Bossman Nov 03 '21 at 21:55
  • @Bossman [Here's a screenshot](https://www.dropbox.com/s/7rfktbmzku8i1w9/Screen%20Shot%202021-11-04%20at%202.09.09%20PM.png?dl=0) but it just says "Failed to load resource: the server responded with a status of 404 (Not Found)". The other errors I've been dealing with, they are because of a mix of http:// and https://, could that be the issue? – Sydney Nov 04 '21 at 18:12
  • @Bossman, just added the SSL, now all links are https. Error still occurs. And thank you for your help! – Sydney Nov 04 '21 at 18:17
  • 2
    Seems like your permissions etc are correct. Long shot, but i did notice you're running ad blocker extensions on your browser, have you added the site to those or disable them, just in case they're interfering.. – Bossman Nov 04 '21 at 18:31
  • @Bossman no go. Turned them both off, nothing changed. Tested all extensions, turned them all off. Restarted browser, restarted computer, tested on other browsers. – Sydney Nov 04 '21 at 18:45
  • 1
    I was going to suggest hard clearing your cache, but you have tested on other browsers, so doubt that will work either.. – Bossman Nov 04 '21 at 18:51
  • 2
    Is there a `.htaccess` file in your `wp-content/uploads/` folder? – Bossman Nov 04 '21 at 18:54
  • 2
    @Bossman I backed up the website, then restored that backup. That worked. For some reason. Thank you for your help! – Sydney Nov 04 '21 at 19:39
  • Glad you got it sorted. May have been a plugin that adds or modifies the .htaccess file, maybe a role/permissions plugin. Even disabled it might not have removed/restored it (poorly programmed) – Bossman Nov 04 '21 at 23:00

1 Answers1

1

Unfortunately, I don't have much of an answer as to why it works, but I do have a solution.

I backed up my WordPress site using a plugin, then restored the backup. My plan was just to do the backup, then restore an old backup, but just in case I tried restoring the backup I just created seconds before—and voila, it worked. I don't know why, but hey! I have a solution.

So make a backup, and then restore that backup.

Thank you to @bossman for helping out in the comments.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Sydney
  • 35
  • 1
  • 8