上传插件时上传的文件超过了 php.ini 中的upload_max_filesize 指令错误 [英] The uploaded file exceeds the upload_max_filesize directive in php.ini error while uploading plugin
问题描述
当我尝试在 wamp 2.0 中为我的 Wordpress 模板上传插件时,出现错误:
When I tried to upload a plugin for my Wordpress template in wamp 2.0 I got an error:
上传的文件超过了php.ini中的upload_max_filesize指令
The uploaded file exceeds the upload_max_filesize directive in php.ini
如何修复这个错误?
推荐答案
如果我们用过 WordPress,我们至少见过一次这个错误.安装主题、插件或上传图像或文件时,它与主题或插件.问题在于我们的服务器设置限制了上传文件的最大大小.
We have seen this error at least once if we have used WordPress.When installing a theme, plugin or uploading an image or file, It has nothing to do with the theme or plugin. The issue is with our server settings which limit the maximum size for uploaded files.
这是一个常见错误,很容易修复.此错误消息表明您尝试上传的文件大于网络主机允许的大小(WordPress 默认文件上传大小为 2 MB).
It’s a common error and it can be easily fixed. This error message is an indication of that the file you are trying to upload is larger than your web host allows (WordPress default file upload size is 2 MB).
上传的文件超过了php.ini中的upload_max_filesize指令
The uploaded file exceeds the upload_max_filesize directive in php.ini
解决方案:
解决方案很简单,需要增加文件大小上传限制.
A solution is easy, need to increase the file size upload limit.
如果在使用 XAMPP 的本地机器上使用 WordPress,我们将在以下位置找到 php.ini.Windows:C:/xampp/php/php.ini
If using WordPress on a local machine using XAMPP, we will find the php.ini in the following locations. Windows: C:/xampp/php/php.ini
打开 php.ini 文件.在 php.ini 文件中找到这些行并将其替换为以下数字
Open the php.ini file. Find these lines in the php.ini file and replace it following numbers
upload_max_filesize = 64M
保存更改并刷新您的网站,然后再次尝试上传文件.您现在将获得成功.
Save the changes and refresh your website and try uploading the file again. You will now get success.
这篇关于上传插件时上传的文件超过了 php.ini 中的upload_max_filesize 指令错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!