1

I want to load a minimal resources in Wordpress because the server that I'm working on is very slow.

I tried defining short init in the wp-config file:

define('SHORTINIT', true);

But then I got this error:

Fatal error: Call to a member function main() on a non-object in /somepath/functions.php on line 790

So I tried adding this line on the uppermost portion of the plugin that I'm working with:

require_once(ABSPATH . 'wp-includes/load.php');

But it didn't work.

I tried putting it on the uppermost part of the plugin instead:

<?php if ( ! defined( 'ABSPATH' ) ) exit;
/*
Plugin Name: someplugin
*/
define('SHORTINIT', true);

But I get the following:

Notice: Constant SHORTINIT already defined in /someplugin/someplugin.php on line 9

Any ideas how to do this properly?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.