How to disable Compilation mode via FTPΒΆ

Very often installation of new extensions with Compilation Mode enabled breaks your site. You cannot view the front-end and back-end. Nothing works. In this case the only solution is to disable Compilation Mode to get the site back to normal state.

  1. Connect to your server using FTP Manager

  2. Go inside ‘includes’ folder

  3. Open the file ‘config.php’ for editing

  4. Find the lines:

    define('COMPILER\_INCLUDE\_PATH',dirname(\ **FILE**).DIRECTORY\_SEPARATOR.'src');
    #define('COMPILER\_COLLECT\_PATH',dirname(\ **FILE**).DIRECTORY\_SEPARATOR.'stat');

    and comment them out:

    #define('COMPILER\_INCLUDE\_PATH',dirname(\ **FILE**).DIRECTORY\_SEPARATOR.'src');
    #define('COMPILER\_COLLECT\_PATH',dirname(\ **FILE**).DIRECTORY\_SEPARATOR.'stat');
  5. Save the changes.

Now you can get into your back-end. If you need to enable the Compilation mode again you should use ‘Run Compilation’ button and NOT just enable it again (as it will break your site again). Running it will compile all new files correctly.

All Magento Extensions by MageWorx are compatible with Compilation Mode.

Should you have any questions on this article or would like to learn more about our Magento plugins, Magento 2 extensions or services, we will be more than happy to help. To submit your request, please follow this link.