问题描述
我在将图像上传到Wordpress的媒体"部分时遇到问题.这是我的屏幕截图: http://prntscr.com/hgjkle
Hi i am facing an issue during upload image into Media section of Wordpress.This is my screenshot : http://prntscr.com/hgjkle
我已经尝试了所有基本步骤来解决此问题,但是很遗憾,我还没有获得任何成功.我尝试过的步骤是:通过.htaccess文件,通过将代码添加到Function.php
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');
}
我还为上载文件夹设置了正确的权限(755),但没有任何反应.
I have also set the right permissions (755) to the upload folder, but nothing happens.
推荐答案
我发现更新最新的wordpress版本时wp_post表已损坏.在 wp_post 下没有自动递增ID,因为所有新上传的文件都将获得0值作为回报.
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.
**解决此问题的步骤**1.打开您的phpmyadmin2.打开您的网站数据库3.打开帖子表并打开表的结构.将ID设置为主键从帖子表中恢复AUTO INCREMENT的位置
** Steps to fix this issue**1. Open your phpmyadmin2. open your website data-base3. 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....
就是这样.
享受编码:)
这篇关于WordPress的文件上传问题:上传时发生错误.请稍后再试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!