Tar*_*zat 30 php wordpress fatal-error memory-limit
当我尝试在我的wordpress脚本中打开我的一个仪表板页面时出现错误
错误消息如下:
致命错误:第2685行/home/admin/domains/filesick.com/public_html/wp-includes/taxonomy.php中允许的内存大小为268435456字节(尝试分配71个字节)
我四处询问并被告知我必须将memory_limit增加到高于256M的值,因此我将其更改为512M仍然是同样的问题.然后我把它改为3024M,这就是我现在所拥有的,但这并没有解决问题.
那么请你告诉我如何解决这个问题,我该怎么办?
等待你的答复.
Dav*_*oss 46
WordPress将PHP的内存限制覆盖到256M,并假设之前设置的内容太低而无法呈现仪表板.您可以通过定义WP_MAX_MEMORY_LIMIT
in 来覆盖它wp-config.php
:
define( 'WP_MAX_MEMORY_LIMIT' , '512M' );
Run Code Online (Sandbox Code Playgroud)
我同意DanFromGermany,256M实际上是用于渲染仪表板页面的大量内存.改变内存限制实际上是对问题的绷带.
小智 16
我有这个问题.我搜索了互联网,采取了所有建议,更改了配置,但问题仍然存在.最后在服务器管理员的帮助下,他发现问题出在MySQL数据库列定义中.表中的一列被分配给'Longtext',这导致分配4,294,967,295个内存.如果你不使用MySqli prepare语句似乎工作正常,但是一旦你使用prepare语句,它就会尝试分配那么多的内存.我将列类型更改为Mediumtext,需要16,777,215个内存空间.问题消失了.希望这有帮助.
小智 5
I changed the memory limit from .htaccess and this problem got resolved.
I was trying to scan my website from one of the antivirus plugin and there I was getting this problem. I increased memory by pasting this in my .htaccess file in Wordpress folder:
php_value memory_limit 512M
Run Code Online (Sandbox Code Playgroud)
After scan was over, I removed this line to make the size as it was before.