Er Parwinder Hirkewal
Er Parwinder Hirkewal

Reputation: 306

Wordpress file upload issue : An error occurred in the upload. Please try again later

Hi i am facing an issue during upload image into Media section of Wordpress. This is my screenshot : http://prntscr.com/hgjkle

I have tried all the basic steps to fix this issue but unfortunately I haven't had any success yet. The steps I have tried are: by .htaccess file by add code into Function.php

add_filter('wp_image_editirs','change_graphic-lib');

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

I have also set the right permissions (755) to the upload folder, but nothing happens.

Upvotes: 0

Views: 5957

Answers (3)

Madars Vi
Madars Vi

Reputation: 1017

Try mysqlcheck -r DATABASE ...

Upvotes: 0

Er Parwinder Hirkewal
Er Parwinder Hirkewal

Reputation: 306

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 :)

Upvotes: 3

Siddhesh damble
Siddhesh damble

Reputation: 94

Login into wordpress Settings -> Media -> under Uploading Files check "Store uploads in this folder" check if wordpress upload folder path is mentioned there. Hope this helps.

Upvotes: 0

Related Questions