Photos not uploading in Wordpress media manager - wordpress

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.
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.
SOS and thanks for any help!

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.

Related

Wordpress - Images not showing up in Media Library

for some reason, WordPress images not showing up in Media Library since yesterday moreover when I try to upload an image is getting the error "An error occurred in the upload. Please try again later.
I tried everything I read, fix permission, update everything, disabled all plugins, enable default theme, install some plugins like Hotfix, and Media sync, etc upgraded PHP with no luck,
when I'm going to the Media library the image is like grid view
when I'm going to list view it shows blank thumbnails without the option to delete them.
list view
could you please help?
My guess is the allowed memory limit for PHP needs to be increased. If you have access to update this values, consider updating it. It's found in your php.ini files. The default is usually 64MB. You could try adding multiples of 64 MB. So 256MB should be fine. Good luck!
Another update is that when in the library is selected “All media items” and “all dates” not showing anything if i choose a specific month it shows the media.
Moreover if i delete the folders from the upload it still available in the gui bit without photos.
But im still facing issues to upload or to see all the media.
After my deeper investigation i figure out the following the "no title" created every time im trying to upload a photo.
there are 2 issues
i have set the media settings to Organize my uploads into month- and year-based folders
But when im uploading a photo for some reasons the upload goes in older folders and not Feb 2023.
if i disable this feature then the photos upload goes to the roor of the upload folder and again in the library shows error.
if i manually upload the photo via FTP in a specific folder also the last uploaded file shows as "no title"

I can't upload image in wordpress

when i upload an image in wordpress media library this message appears
post-processing of the image failed likely because the server is busy or does not have enough resources. uploading a smaller image may help. suggested maximum size is 2500 pixels.
i have tried some methods to solve it like increase Maximum upload file size and change php version
I'm using hostGator as a web host .
use wp filter
add_filter( 'big_image_size_threshold', '__return_false' );
I faced the same issue and in my case it was related to nginx
413 Error response
Request Entity too large
and yes image was more than 2M by default in NGinx configuration
client_max_body_size 2M; -> client_max_body_size 64M;
should be set in server or location section of .conf file
Wordpress was running in docker compose and that was the root cause
If this error occurs on your Local by Flywheel desktop app I was able to fix it by changing the web server from nginx to Apache.
What fixed this error for me was updating an image related plugin called Images to WebP from version 1.9 to the latest which is 4.1 at the time of writing. And everything worked just fine afterwards. I found the solution here https://support.nova.bi/d/3-wordpress-error-while-uploading-images. I had tried everything including increasing PHP allocated memory, restarting my server, checking Wordpress permissions, modifying current theme functions.php file... but nothing worked. Only after I updated the plugin the upload worked again.
Hope this helps someone.
There are a few solutions to this issue. First, are you running PHP 7.3 and WordPress 5.3? You may try downgrading to PHP 7.2.
Next, you may try increasing your site’s memory limit.
If neither of these works you may attempt to work around it.
Go to your media library and select any picture. Preferably one that you managed to upload successfully. Click Edit and look at where the picture is located. keep this open or remember it.
Connect to your server via an FTP client and navigate to this folder where your images are stored. Upload your large photographs to this folder.
They won’t show up in your media library yet. You need to use a plugin called 'Add From Server'. Download that and install/activate it (by Dion Hulse).
Backup your WordPress installation (just in case).
Finally, hover over Media and then select the new option = Add From Server
Navigate to the folder where you uploaded your photos. Make sure you select just the photos you want to import into your Media Library (although you could delete the duplicates if you make a mistake).
After you click go, it’ll take some time, but don't cancel it or refresh the page. Just wait, and you’ll get a notification on the same screen when it's done. Along with a new list of imported files (including size variations if applicable).
Now your photos will be in your media library with ‘scaled’ at the end. You can now use these in your posts and they will work just fine.
NOTES
The files are imported to wherever you select them from. So it’s important that you put them in the same folder as the rest of your active pictures BEFORE you import them. Otherwise, they’ll show up in the media library, but won’t actually work on your website (took a while to figure this out).
I’d recommend importing 10-15 pictures at a time if they are large. Any more and you risk being signed out of your cPanel due to inactivity and it may break your installation (maybe, hence the backup).
Also, you may look through this wordpress.org thread as many solutions are discussed in the thread. https://wordpress.org/support/topic/unable-to-upload-images-67/page/5/
Let me know if this helps!

WordPress Images not loading after migration

I'm facing a problem the last couple of days and I can't figure it out. We changed the hosting company and move our website (same domain name) to another hosting provider. After migration, images not loading, and I can see them broken in WordPress's Media Library.
I tried to change the permissions in the upload folder but that didn't worked. SSL is also working as expected. I disabled all the plugins and even changed the theme, but the problem still persists. I re-uploaded all the backup files again to make sure that I wasn't missing something, but the problem haven't been solved.
I also have the support team from the hosting provider that works on the website, but there's been 2 days now and they can't find a way to solve the issue.
In the browser's Search Console I do see the following errors: https://ibb.co/y0KCmHY
I've also checked the DNS settings in CloudFlare to make sure that I have setup everything correctly.
Any help will be much appreciated!
I am no wordpress expert but I think I would first check whether image files in your backup files are not damaged/corrupted.
I would check both your backup files and image files in your new hosting server
(download image files from your new hosting server via FTP)
Sorry I couldn't help you much except where to look at first which you might already know.
From the image that you've provided, what I can tell the status is 404 like you know which means your image is not found. Something wrong with all your image URL. You need to make sure the URL is correct for each image you have.

WordPress site not showing some images

I have been trying for 2 days to fix this issue. I was just hired as a web dev at this company that already has a working website : site
They asked me to fix a couple of things, which I did, however this one is quite annoying.
So the issue is that all the images are uploaded as products in woocomerce, and the site generates the product page.
Yet, after the wp update some of my images are not showing up and reuploading fixes the problem temporarily then it happens again.
This is an example of what happens :here
I did:
ftp and the images are there
check css, nothing seems wrong
The image is returning an 404:
The image is not present within the given folder. You should probably discuss with your coworkers why this file could be missing from the folder and if there is a backup or not.

Wordpress featured images and media library thumbnail no longer displays

I have a WordPress blog that is on a VPS. Everything has been working fine until today when I realised that my featured images are no longer displaying. I logged in to my dashboard, media library, and all the image thumbnails are no longer displaying properly.
Before this time, I had a little issue with my caching plugin (W3Total Cache), so I deactivated it, and my site continued to function normally. But now, no featured image is displayed all through the site. What amazes me is that inline images in a post are still displaying in the site. See example.
Now my site's homepage is just blank, because no featured images are displayed. As of today, images which I attached in the post are just seen as links, but if the link is clicked, it redirects to the image. Here are some of the things I've tried so far:
I've run df -h ssh command to verify if my diskpace is full.
I've restarted mysql server several times.
I've manually downloaded wordpress .zip file, and upload to the site.
I've automatically reinstall wordpress using http://www.example.com/wp-admin/update-core.php.
I've switched to a default theme.
I've tried some of the resources similar to this question here, but none of the proffered solutions resolved my issue.
My permission settings for all the sub-directories under wp-content is 755. I have also tried changing them to 775 and 777.
*. I've used the Regenerate Thumbnails plugin to try to regenerate the thumbnails, but it returned an error The error message was: The originally uploaded image file cannot be found at, but when I view the image directly from my browser, it returns the image.
I've also used the WP Original Media Path plugin to try and restore the media path (if it was messed up), but to no avail.
I've deactivated all plugins too.
I just checked my wp_postmeta table in my DB and it returned this error wp_postmeta table is marked as crashed
How do I rectify this issue?
Since the source of your homepage has nothing in the main section:
<section class="entry-content clearfix" itemprop="articleBody">
</section> <!-- end article section -->
and also due to the last item in your question, I assume you have a database problem instead of missing files (which I think would throw some 404s in my browser instead).
Do you have WP_DEBUG_LOG? If so, check wp-content/debug.log for errors. Be sure to launch phpMyAdmin and browse around the tables to see everything is good in there.
Use CHECK TABLE to confirm if tables are corrupted, and in that case use REPAIR TABLE to try to fix them (maybe phpMyAdmin has those in its GUI, I'm not sure right now).
In IIS -> Php Manager-> Php Extensions -> php_gd2.dll enable. refresh or restart the server it will work...
After long days try got this solution.

Resources