I have been searching many forum to resolve this problem and followed many possible resolution practice but I still see the same error when uploading media:error uploading media come back later
note that the image exist in the correct folder uploads, when I check using my FTP to connect to the server. And the image is visible using the URL
I tried the following but with no luck at all, and clear the cache each time on both my server and the browser:
- Deactivate all the plugin
- raise the php memory limit to 286M
- use a small image
- change the file permission to 755, I even tried 777
- use another theme
- I have the latest PHP version and the latest WordPress version
- it’s not a limit from my server host
- made some change in the functions.php to change the image editor
I just cannot find the problem
here’s the URL of the site if that can help: https://onzeonze.media
2
Answers
I would suggest turning on the WP_DEBUG function so the error will give you more details, it sounds like it’s uploading but not being recorded in the database, therefore wordpress won’t see the image. There are plugin’s to scan the uploads folder for images, but this isn’t ideal.
To enable the debug and to show the issue add/edit in the wp-config.php
Here is more info: https://wordpress.org/support/article/debugging-in-wordpress/
Remember to turn that off when you’re done with it, this can make your wp venerable!
You could try to check if your
wp_posts
table is corrupted using the steps mentioned in this answer.Check Auto Increment
You can check the
wp_posts
table using phpMyAdmin. Please ensure that you backup your database before making any changes.From phpMyAdmin, select your site’s database and then click on the
wp_posts
table. Navigate to the Structure tab for the table. Check if the ID is set as the primary key and AUTO_INCREMENT is set for the ID as shown. If it is not, use the Change option to add the AUTO_INCREMENT in the Extra column.