有没有什么方法可以知道 cPanel 中 WordPress 的最大上传限制并增加它?
在我的例子中,最大上传大小仅为 1 MB。我开始在 WordPress 仪表板中的设置中搜索,但没有任何设置,我开始通过发现 WordPress 站点运行状况中声明的一些错误和建议来解决它。我发现了以下两个建议。
并且在google搜索中我发现可以在cPanel中的“选择PHP版本”中更改此功能,但此功能不可用,我发现此消息“”PHP Selector is not available.请联系您的托管服务商。”
比我安装的插件解决了我的问题。
我发现谷歌搜索之一在数据库中添加 php.ini 文件并输入以下代码。 对于 PHP.INI 文件
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
OR
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 400M
file_uploads = On
max_execution_time = 180
但创建此文件后托管服务暂停了一段时间。那么,有没有什么安全的方法来增加galary的上传文件大小。
托管服务当前定义的文件大小在哪里?
Maximum upload size in my case was only 1 MB. I started to search in settings in the WordPress dashboard but no any settings for that, started to solve it by finding few errors and recommendations that was declared in WordPress site health. I found two recommendations as follows.
and in google search I found that this can be changed in cPanel in "select PHP version", but this feature was unavailable, I found this message ""PHP Selector is not available. Please, contact your hoster."
Than I installed plugin that solved my problem.
One of google search I found to add php.ini file in database and put following codes.
For PHP.INI file
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
OR
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 400M
file_uploads = On
max_execution_time = 180
But after creating this file hosting service put in suspension for sometime. So, is there any safe method to increase upload file size of galary.
Where is current defined file size by hosting service?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过在主题的functions.php 文件中添加以下代码行轻松增加大小限制。
但是,请记住,如果您更改主题,则最大上传大小将返回到默认值,直到您编辑新主题的functions.php 文件。
php.ini 选项
上传最大文件大小 = 25M
post_max_size = 13M
内存限制=15M
在任何文本编辑器中打开该文件并添加以下代码。
You can easily increase the size limits by adding the following lines of code in the functions.php file of your theme.
However, remember if you change the theme then max upload size will return to its default values until you edit the functions.php file of the new theme.
php.ini Option
upload_max_filesize = 25M
post_max_size = 13M
memory_limit = 15M
Open the file in any text editor and add the following code.