We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

phalcon mutiple config why not use one dbconfig

phalcon mutiple config why use one dbconfig .instead of one in frontend ,one in backend

edited Dec '15

I'm right there with you so I created a single config file in frontend/config and created a symlink in every module's config folder linking to the frontend file.

Create this as your master config:


the create a symlink for backend:

ln -s /path/to/project/root/apps/frontend/config/config.php /path/to/project/root/apps/backend/config/config.php

edited Dec '15

Hmm, isn't it an option for you to create project level config in


As in this example https://github.com/phalcon/mvc/tree/master/multiple-volt

Then add it to di as e.g. globalconfig and access from any module you want ($this->globalConfig). Optionally you may have separate config for each module in root/apps/module/config/config.php in the same time and use it instead of global for module if it's available, or merge it with global config.