What is codePool in Magento?

codePool is a tag which you have to specify when registering new module in app/etc/modules/Company_Module.xml

There are 3 codePools in Magento: core, community and local, which are resided at app/code/ directory.

Core codePool is used by Magento core team, Community is generally used by 3rd party extensions and Local codePool should be used for in-hour module development and overriding of core and community modules for custom requirement.
So in short, codePool helps Magento to locate module inside app/code/ for processing.

Basically in magento, we need to define code pools so that Magento can understand path to find files for extensions/ custom functionality. The motive of code pools is to keep the magento core separate from modification either by us or 3rd party extensions.

Magento has three different codepools:

1. Core
2. Community
3. Local

Name: code-pool-magento.pngViews: 23Size: 20.2 KB

Core folder contains all of the base classes where Magento gets its flexibility and functionality from. It is suggested not to change any code in core files as while upgrading to latest version of magento all files will overwrite.

Community folder belongs to community developers. All 3rd party extension installed extension files resides in community folder in magento. So, if you have installed any extension in magento, it must be in app/code/community/ only.

If you are a Magento developer & have an intend to change the logic functionalities, blocks or methods, copy the necessary folders from the Core pool to Local pool, you can use Local folder. If you want to override Magento extensions, and do whatever you are inclined to do.

Related posts