Magento Compiler Mode

In magento the compiler interface is located at System -> Tools -> Compiler but we couldn’t enable the complier through interface.

This article still has some useful tips for dealing with the compiler via the command line

What the compiler does is makes a copy of of every class in a Magento system and places them in a single folder. The class’s full name is used for the filename to ensure uniqueness


This is done once. Then, when Magento is configured to use the compiler classes, its autoload will look in the compiler folder instead of running its normal autoload routine. This spares PHP the overhead of transversing the file system for all the different include paths.

cd shell
php -f compiler.php help

and you can get the below output:

state         Show Compilation State
compile       Run Compilation Process
clear         Disable Compiler include path and Remove compiled files
enable        Enable Compiler include path
disable       Disable Compiler include path
help          This help

Now using above commands (state, compile, clear etc) you can play.

php compiler.php compile

This may take a few minutes, as Magento is traversing your system and pulling out every possible class. If you take a look at the includes/src directory, you’ll see all your classes


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s