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:
.jpg
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/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:
/
.php?post=205158&action=edit
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 - / - , the Site Health output showed 0 bytes so this is somehow related or the Site Health plugin doesn't correctly report the size.
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://i.sstatic/PYDML.jpg
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/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:
https://www.hlbenefits/medicaldisclaimer/
https://www.hlbenefits/wp-admin/post.php?post=205158&action=edit
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/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.
Share Improve this question edited Apr 12, 2020 at 20:06 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Apr 7, 2020 at 22:15 Cat HarissCat Hariss 14 bronze badges 4- 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. – 西門 正 Code Guy - JingCodeGuy Commented Apr 7, 2020 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 Commented Apr 8, 2020 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. – 西門 正 Code Guy - JingCodeGuy Commented Apr 8, 2020 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 Commented Apr 12, 2020 at 8:40
1 Answer
Reset to default 0With help from @simongcc and https://fancythemes/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.