How to disable compilation in Magento

In general, Create Hosting customers shouldn't need compilation enabled, since our Magento Hosting Plans come pre-configured and optimised with APC cache. However, if you accidentally enabled compilation, or if you are actively using compilation instead of APC Cache and need to disable compilation to perform an upgrade, install or remove an extension etc, then you will need to disable it again.

There are two ways in which this can be done:

1. Via Magento admin

Navigate to System > Tools > Compilation page and click on Disable button
Navigate to System > Cache Management screen and use Flush Cache button.

2. Via SFTP, by editing the includes/config.php file

To disable compilation in Magento, edit includes/config.php. At around line 28, uncomment the first line and comment out the second:

#define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');

3. Via SSH

 

php -f shell/compiler.php -- disable
php -f shell/compiler.php -- clear

Check the status:

 

# php -f shell/compiler.php -- state
Compiler Status:          Disabled
Compilation State:        Not Compiled
Collected Files Count:    0
Compiled Scopes Count:    0

 

Clear the cache:

rm -rf var/cache/* var/session/*

 

If you are a Create Hosting customer on the Magento Hosting Plan, feel free to submit a support ticket and we can take care of this issue for you.

  • 30 Users Found This Useful
Was this answer helpful?

Related Articles

How to upgrade Magento 1.3 to 1.4.1.1

The Magento 1.3 to 1.4.1.1 upgrade is quite complex, as there are many changes to the database...

How do I make my Magento site temporarily unavailable (put into maintenance mode)?

There may be times when you need to perform an upgrade and don't want your website to be accessed...

How to activate the Mobile HTML5 theme in Magento 1.7 (for Android, Blackberry, iPhone, iPod, Windows Mobile, etc)

Magento 1.7 comes with a new Mobile HTML5 theme out of the box. This should be compatible with...

How to fix broken or slow Sales Order Address editing via Magento Admin

We recently came upon an issue in a Magento 1.5* instance where any attempt to edit the customer...

How to report an issue / bug.

We can't fix a problem that we can't replicate so we need as much information as possible in...