媒体正在 Wordpress 中上传但显示错误“上传时发生错误.请稍后再试." [英] Media is uploading in Wordpress but showing error " An error occurred while uploading. Please try again later. "
问题描述
我试图在 WordPress 媒体上传中上传 jpeg 图像.上传时,显示错误上传时发生错误.请稍后再试."
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. "
上传时出现错误提示
但是当我重新加载页面时,图像显示在列表中,如下所示.
But when I reload the page, the image is showing in the list as below.
重新加载页面后
所以,图片正在上传,这意味着没有文件夹权限问题,我已经申请了:
So, the picture is uploading which means there is no folder permission issue, and I have applied:
写入文件上传限制为 PHP 代码:286M.
Wrote file upload limit is PHP code: 286M.
清除浏览器缓存.
升级 WordPress 版本.
Upgrade WordPress version.
禁用我正在使用的所有插件.
Disable all the plugins I'm using.
遵循他们的程序:http://to-developer.com/blog/?p=2146
按照他们的程序:Wordpress 文件上传问题:上传时出错.请稍后再试
functions.php 的变化:
Change in functions.php :
function change_graphic_lib($array) {返回数组('WP_Image_Editor_GD', 'WP_Image_Editor_Imagick');}
function change_graphic_lib($array) { return array('WP_Image_Editor_GD', 'WP_Image_Editor_Imagick'); }
遵循他们的程序:https://mybestofmylife.com/wordpress-media-error
最后,我仍然没有找到任何解决方案.
At the last, still, I haven't found any solution.
推荐答案
我发现 wp_post
表在更新最新的 wordpress 版本时已损坏.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.
解决此问题的步骤
- 打开你的phpmyadmin
- 打开您的网站数据库
- 打开帖子表和表的开放结构.将 ID 设置为主键从哪里恢复帖子表上的 AUTO INCREMENT
之后,您可以重新加载媒体页面,现在您可以轻松上传媒体中的图像....
After that you can reload media page now you can easily able to upload images in media....
就是这样.
享受编码:)
这篇关于媒体正在 Wordpress 中上传但显示错误“上传时发生错误.请稍后再试."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!