Last active
December 1, 2020 21:01
-
-
Save GwendolenLynch/33e992a567ef84cfee3c to your computer and use it in GitHub Desktop.
Bolt 2.0 Multisite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Bolt multi-site bootstrap | |
* | |
* @author Gawain Lynch <[email protected]> | |
* | |
* @return \Bolt\Application | |
*/ | |
return call_user_func( | |
function () { | |
// The full path to the core Bolt files | |
$source = '/path/to/bolt'; | |
// The full path of the individual site | |
$site = '/var/www/sites/my-site-1'; | |
require_once $source . '/vendor/autoload.php'; | |
$configuration = new Bolt\Configuration\Standard(dirname(__DIR__)); | |
$configuration->setPath('root', $source . '/'); | |
$configuration->setPath('app', $source . '/app'); | |
$configuration->setPath('apppath', $source . '/app'); | |
$configuration->setPath('config', $site . '/app/config'); | |
$configuration->setPath('cache', $site . '/app/cache'); | |
$configuration->setPath('database', $site . '/app/database'); | |
$configuration->setPath('extensionsconfig', $site . '/app/config/extensions'); | |
$configuration->setPath('extensionspath', $site . '/extensions'); | |
$configuration->setPath('files', $site . '/files'); | |
$configuration->setPath('themebase', $site . '/theme/'); | |
$configuration->setPath('web', $site . '/'); | |
$configuration->getVerifier()->disableApacheChecks(); | |
$configuration->verify(); | |
$app = new Bolt\Application(array('resources' => $configuration)); | |
$app->initialize(); | |
return $app; | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Bolt multi-site index | |
* | |
* @author Gawain Lynch <[email protected]> | |
*/ | |
$app = require_once __DIR__ . '/bootstrap.php'; | |
$app->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
$app = require_once __DIR__ . '/bootstrap.php'; | |
$nut = $app['nut']; | |
$nut->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment