make(Illuminate\Contracts\Http\Kernel::class); $app->bootstrapWith([ \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class, \Illuminate\Foundation\Bootstrap\LoadConfiguration::class, \Illuminate\Foundation\Bootstrap\HandleExceptions::class, \Illuminate\Foundation\Bootstrap\RegisterFacades::class, ]); $app->instance('request', Request::capture()); Facade::clearResolvedInstance('request'); // force the root url to whatever is set in the env file, stops wordpress taking over the root url // when loading from wp-config.php url()->forceRootUrl(config('app.url')); $app->bootstrapWith([ Illuminate\Foundation\Bootstrap\RegisterProviders::class, Illuminate\Foundation\Bootstrap\BootProviders::class, ]);