Disable Compiler in Magento to Fix Blank Frontend and Admin Issue

Recently a client experienced an issue with their Magento site displaying a blank white page on the front end and for the admin page when accessed through the browser. With the site completely inaccessible it is impossible to identify any issue within the admin / config.

There had been some recent extension installations and tweaks made to settings within Magento, but after testing at the time there were no issues and no further changes made after this point which could have caused the site to error and be inaccessible.

After a little investigating I found the issue, basically someone had enabled the compiler within Magento’s admin which had caused a conflict, possibly with recent extension installations.

To fix this blank page issue in Magento, caused by Magento’s compiler, we can make an edit to the root folders index.php file by commenting out a few lines of code which will disable compiler for us.

Disable Magento Compiler

With Magento’s frontend and admin inaccessible to us, we cannot access the admin menu to disbale compiler within the System > Tools menu. Instead you need to FTP to the root directory of your Magento installation and open your Magento sites index.php file in an editor of your choice.

Once index.php is open in your editor, find the 4 lines of code below.

$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
if (file_exists($compilerConfig)) {
    include $compilerConfig;

After locating the code above, simply comment it out, then re upload your index.php file.

#$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
#if (file_exists($compilerConfig)) {
    #include $compilerConfig;

If you still see a blank page after taking the above action, you may need to clear your browsers cache, along with manually deleting Magento’s cache in your installations var/cache and var/sessions directories.

Cause for Magento Compiler Issue

There can be a few causes for the described issue with compiler, such as new modules not working with compiler or enabling compiler without it being run prior.

Once your store is back up and running you can remove the comments and test running and enabling compiler within your Magento stores admin.

6 Responses