I am get confused a little bit about the correct answer for this question, may be it is small.

One /app/code/core/Mage/Core/Model/App.php

 public function run($params)
    $this->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS);

        if ($this->_config->isLocalConfigLoaded()) {
            $scopeCode = isset($params['scope_code']) ? $params['scope_code'] : '';
            $scopeType = isset($params['scope_type']) ? $params['scope_type'] : 'store';
            $this->_initCurrentStore($scopeCode, $scopeType);

    return $this;

Base configuration as well as Module configuration is loading by below code when request something.


Two app/code/core/Mage/Core/Model/App.php

public function init($code, $type = null, $options = array())

    $this->_config = Mage::getConfig();

    if (Mage::isInstalled($options)) {
        $this->_initCurrentStore($code, $type);
    return $this;

It is calling when we call Stactic Method Mage::app(); initializing configuration and loading

Based on One and Two Config loading which is the correct answer for tagged (How and when does Magento load .... ) question ?

Any answer appreciate.

1 Answer 1


In Magento have three executing function (Mage::init(), Mage::app(), Mage::run()). But there are two main functions that usually use for executing, that is Mage::app(), Mage::run().

You can read this: http://vncosy.com/magento-what-is-the-difference-regarding-module-loading-between-magerun-and-mageapp/

  • cool answer , But what if get asked above question ( how and when does ... base configuration, the module configuration, and the database configuration? ) . Do I have to say Mage::app() or by the public function run(). Feb 4, 2016 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.