Yoast post_tag-sitemap 给出错误 500

Yoast post_tag-sitemap giving error 500

我有一个带有 Yoast SEO 插件的 wordpress 网站。插件生成了我的 sitemap_index.xml 但我无法访问其中的一些。

我可以访问我的 post-sitemap.xml 和类别-sitemap.xml。 但是我无法访问我的标签 XML (post_tag-sitemap.xml)。它给出错误 500.

这是我的错误日志:


PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /home/******/public_html/wp-content/plugins/wordpress-seo/inc/class-sitemaps.php on line 439


我已经尝试更改 define('WP_MEMORY_LIMIT', '64M');在我的 wp-config.php 中没有成功。 我已经尝试减少 Yoast Sitemap 插件中的项目数量,但没有成功。

有人可以帮助我吗?

这个解决方案对我来说是完美的:

if (!defined('WP_MEMORY_LIMIT')) define('WP_MEMORY_LIMIT','128M');

如果问题仍然存在,请将此行添加到 wp-config.php:

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

如果一直出现,请在您的网站根目录(通常是 www、public_html 或 htdocs 文件夹)创建 php.ini 文件并添加以下行:

memory_limit = 64MB

祝你好运。

来源WPAPI