0

After moving my website from one host to another I am unable to upload new pictures in my media library either by directly using the Media > Add New menu or by adding media from within the new post editor.

The weird thing is that it seems that the upload was successful as I can see the image being added into the media library and even the correct image size and path is being displayed but instead of the preview image I get a blank white image as shown in this image below:

https://imgur.com/a/KorAgZo

When checking the actual path of my website I don't see the ../2020/04/ folder being created or the image anywhere to be found. If I manually create the path and upload the image using ftp while also setting the correct folder permissions and ownership ( /var/www/hlbenefits.com/html/wp-content/uploads/2020/04/medicalDisclaimer ), I still cannot see the preview image in the media library but the image is accessible for viewing or editing here:

Please note that:

  • I can successfully upload other files such as theme or plugin files to my WordPress website.
  • I can see and use other old images.
  • Other websites hosted on the same host do not have this issue.

What I have done so far:

  • I have completely disabled all plugins and themes and applied the default Twenty Nineteen theme.
  • Double checked the folder permissions and ownership
  • Completely disabled cloudflare for this website.
  • Activated the wordpress debug mode and observed the log file in real time.
  • Installed Site Health and applied the recommended improvements so right now I only need to remove inactive plugins and themes.
  • Tried saving the Permalink Settings as suggested by other wordpress members

My wordpress configuration as shown by the Site Health plugin is as follows:

I tried to add here the output of the Site Health plugin but my quested was marked as spam and there was no other way to correct this but to delete the whole output. Please see the wordpress forums link below.

What I find weird is the uploads_size: 10.18 MB (10671247 bytes) that's inaccurate as my uploads folder is way bigger than this and I've noticed that in my initial post on the wordpress forums - https://wordpress.org/support/topic/unable-to-view-newly-uploaded-images/ - , the Site Health output showed 0 bytes so this is somehow related or the Site Health plugin doesn't correctly report the size.

  • How did you move your site? Sometimes problem arises after moving. Did you try to setup a new website as a subdomain to test? So that it could compare and confirm that under same domain have same problem or not. – simongcc Apr 7 at 23:26
  • I have installed a fresh wordpress and restored from a UpdraftPlus backup. Didn't tried the subdomain website but I did moved other websites using the same method on this host and they don't seem to have this issue. – Cat Hariss Apr 8 at 12:40
  • did UpdraftPlus replace the domain for you in DB? Because Duplicator will do that, I am not sure if UpdraftPlus will do it for you. It sounds like there is path translation problem to me. – simongcc Apr 8 at 12:45
  • @simongcc Even if not exactly the solution, your answer helped a lot in identifying the culprit. It was the Settings > Media > Store uploads in this folder value that I needed to upload in order to show the correct uploads path – Cat Hariss Apr 12 at 8:40
0

With help from @simongcc and https://fancythemes.com/fix-image-upload-issue-wordpress I've found that the Settings > Media > Store uploads in this folder value was not correct and after updating with the correct path I was able to successfully upload pictures.

| improve this answer | |
  • It is great that you have resolved the issue. And it is my pleasure to share the experience. :) – simongcc Apr 12 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.