How to enable compilation in Magento

The “Compilation” tool in Magento was introduced to give a performance boost to the Magento website. Complation tool does not convert Magento PHP code to Bytecode but what it does is that it concatenates various PHP files into larger files and stores them in a single location “includes/src”. So now the Autoloader has to look in includes/src and will open less files. Without Compliation enabled the Autoloader has to check app/code/local folder, app/code/community, app/code/core and finally lib in sequence in order to load a class.

Steps to enable compilation from Magento Admin:

1. Navigate to System >> Tools >>  Compilation

Magento Admin Menu Tools Compilation

2. The Compiler Status is initially “disabled” and the Compilation State is “Not Complied”. Click the “Run Compilation Process” button.

Magento Tools Compilation

3. Once the compilation is complete, the Compiler Status becomes “Enabled” and Compilation State is “Compiled”. You can also now see a “Disable”  button. Just click this “Disable” button to disable the compilation.

Magento Compilation Enabled

For using the command line tool check the article – How to enable compilation in Magento using the command line tool.

 

NOTE:

  1. In order to use this tool, the directory {MAGENTO_ROOT}}/includes and the file {MAGENTO_ROOT}}/includes/config.php must both be writeable.
  2. Before you make any changes to your Magento installation you should always disable compilation. Once the changes are made, run the compilation process, and then enable it.

Leave a Comment

Back to top