2
votes

I was trying to upload a jpeg image in WordPress media upload. While uploading, it was showing an error "An error occurred while uploading. Please try again later. "

Error message while uploading

Error message while uploading

But when I reload the page, the image is showing in the list as below.

After Reload the page

After Reload the page

So, the picture is uploading which means there is no folder permission issue, and I have applied:

  1. Wrote file upload limit is PHP code: 286M.

  2. Clear browser cache.

  3. Upgrade WordPress version.

  4. Disable all the plugins I'm using.

  5. Followed their procedure: http://to-developer.com/blog/?p=2146

  6. Followed their procedure: Wordpress file upload issue : An error occurred in the upload. Please try again later

  7. Change in functions.php :

    function change_graphic_lib($array) { return array('WP_Image_Editor_GD', 'WP_Image_Editor_Imagick'); }

  8. Followed their procedure: https://mybestofmylife.com/wordpress-media-error

At the last, still, I haven't found any solution.

1
Have you looked at the error logs to see if there's anything present? Also, what server are you using? Apache, Nginx, etc ? - Darren

1 Answers

0
votes

I have found that wp_post table was corrupted while update latest wordpress verion. There is no Auto-increment ID under wp_post due to this all newly upload files get 0 value in return.

Due to this "images" are not uploaded into the gallery.

Steps to fix this issue

  1. Open your phpmyadmin
  2. open your website data-base
  3. open posts table and open structure of table. set ID as Primary Key From where restoring AUTO INCREMENT on the posts table

After that you can reload media page now you can easily able to upload images in media....

that's it.

Enjoy coding :)