简体   繁体   English

为什么我在 WordPress 上遇到致命的内存错误?

[英]Why am I getting a fatal memory error on WordPress?

I get the following error when I try to open the sitemap.xml of my WordPress blog:当我尝试打开 WordPress 博客的 sitemap.xml 时出现以下错误:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1052672 bytes) in /xxx/wp-content/plugins/wordpress-seo/inc/sitemaps/class-taxonomy-sitemap-provider.php on line 131

Link to the Sitemap: https://dooiz.com/sitemap_index.xml站点地图链接: https : //dooiz.com/sitemap_index.xml

The answer is actually pretty obvious.答案其实很明显。 You have to increase the memory limit of your webspace.您必须增加您的网站空间的内存限制。

Write this in your wp-config under the debug line:在调试行下的 wp-config 中写入:

define( 'WP_MEMORY_LIMIT', '512M' );

you could also try writing the following in the .htaccess file您也可以尝试在 .htaccess 文件中编写以下内容

php_value memory_limit 512M

Or ask your webspace provider how and if you can increase the memory limit.或者询问您的网络空间提供商如何以及是否可以增加内存限制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM