# Best way to load plugin configurations?

**URL:** <https://discourse.cakephp.org/t/best-way-to-load-plugin-configurations/2041>\
**Category:** Plugins\
**Created:** [February 11, 2017, 9:21pm UTC](https://discourse.cakephp.org/t/best-way-to-load-plugin-configurations/2041 "2017-02-11T21:21:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Applebiter](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/applebiter/32/521_2.png) [@Applebiter](https://discourse.cakephp.org/u/Applebiter)\
**Post date:** [February 12, 2017, 7:34pm UTC](https://discourse.cakephp.org/t/best-way-to-load-plugin-configurations/2041/2 "2017-02-12T19:34:37Z")

</div>

In my main application’s config/bootstrap.php, I added the following line:

`Plugin::load('Corecast', ['bootstrap' => true, 'routes' => true]);`

In my plugin’s config folder, I created a bootstrap.php file, and in it:

```
use Cake\Core\Configure;

try {
    Configure::load('Corecast.corecast', 'default', false);
} catch (\Exception $e) {
    exit($e->getMessage() . "\n");
}

```

The above call to Configure::load() is given the plugin name and the name of the configuration file, in plugin notation. My custom configuration file is named corecast.php and it is also in my plugin’s config folder.

---

_[View the full topic](https://discourse.cakephp.org/t/best-way-to-load-plugin-configurations/2041)._
