无头CMS的Wordpress 5 SHORTINIT导致错误

问题描述

我正在尝试安装全新的wordpress 5安装程序以用作无头CMS。我发现REST API非常慢,为此我用wp-options.PHP修改define('SHORtiniT',true),如下所示:

...
define('disABLE_WP_CRON',true);
define('WP_MEMORY_LIMIT','256M');

define('SHORtiniT',true);
define('ABSPATH',dirname(__FILE__) . '/');
require_once(ABSPATH . 'wp-settings.PHP');

问题是我收到此错误

Fatal error: Uncaught Error: Call to a member function main() on null in /Volumes/Daten/Websites/SSN-WP/wp-includes/functions.PHP:1285 Stack trace: #0 /Volumes/Daten/Websites/SSN-WP/wp-blog-header.PHP(16): wp() #1 /Volumes/Daten/Websites/SSN-WP/index.PHP(17): require('/Volumes/Daten/...') #2 {main} thrown in /Volumes/Daten/Websites/SSN-WP/wp-includes/functions.PHP on line 1285

我的问题是现在在哪里以及如何以正确的方式设置SHORtiniT,以便用最少的代码加载WP。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)