Understanding SHORTINIT with WordPress 5

You could test if the request is coming in through the rest API before enabling the SHORTINIT

Something like…

if (strpos($_SERVER[ 'REQUEST_URI' ], '/wp-json/') !== false) {
    define('SHORTINIT', true);
}

Leave a Comment