Magento – blank admin or frontend

Seeing a blank page in Magento admin or frontpage?

This usually happens when you have compilation mode on when you modify files, theme templates or modules / extensions, or install a theme or extension.

The Magento Compiler should be disabled every time before installing or removing a Magento extension or when upgrading Magento. Therefore it typically only gets enabled when development for your site is finished. And if you do the ‘famous last little tweak’ when compilation mode is on, sometimes disaster strikes. Happened to me more then once, the trouble being that it takes a whole to realize the cause of your blank screen.

Ok, on to the solution::

So, you left compilation mode on, but cannot reach the backend to switch it off. If you have SSH access, you are in luck.

Step 1: Check current compilation status

$ php -f shell/compiler.php -- state
Compiler Status:          Enabled
Compilation State:        Compiled
Collected Files Count:    6042
Compiled Scopes Count:    4
  • Disable Magento compilation:
    $ php -f shell/compiler.php -- disable
    Compiler include path disabled
  • Clear all compiled files
    $ php -f shell/compiler.php -- clear
    Compilation successfully cleared
  • Ensure that compiler is disabled now by checking its status:
    $ php -f shell/compiler.php -- state
    Compiler Status:          Disabled
    Compilation State:        Not Compiled
    Collected Files Count:    0
    Compiled Scopes Count:    0

Step 2: Clear all cache in Magento

What if you don’t have SSH access?
(For example in a shared hosting solution), I don’t have the solution I’m afraid…