Loading..
Processing... Please wait...

Product was successfully added to your shopping cart.



Magento Enterprise 1.14 to Community 1.9 Downgrade

Magento Enterprise Edtion (EE) is pricey. Today there are many third party extensions for Community Edition (CE) that could cover up almost all EE functionality. You as a store owner might not be even using all features that comes with Magento Enterprise. You might consider downgrading to Magento Community latest release with no data loss. Here I will show you how.

If you want your Magento Enterprise downgraded to Community edition by professionals - contact us today and we help you!

I am going to perform magento downgrade from Enterprise 1.14.0.1 to Community version 1.9.1.1.

Magento Enterprise 1.14 Magento Enterprise 1.14

 

I will be using ssh terminal and bash commands but if you have only ftp access you can still follow the procedure and do files moving/copying/deleting manually.

First we take full files and database backup in case things go wrong. Second we download the latest Magento CE release. Then we disable all core enterprise extensions so that there are no conflicts with the community ones (read on and you will find that enterprise full page cache is working ok with magento community!):

cd app/etc/modules;
for i in Enterprise_*; do mv $i $i.backup; done

 

Lets put store into maintenance mode:

touch maintenance.flag

 

And copy community files over to store root folder (backup app/etc/local.xml first as to not loose your database connection info):

cp app/etc/local.xml app/etc/local.xml.backup

cp -r magento1.9.1.1/* magentoEE/

cp app/etc/local.xml.backup app/etc/local.xml

 

As you probably noticed I didn’t delete all enterprise related files i simply disabled enterprise modules and overwrote core files with community ones.

We need to downgrade the database. For that we will not use the browser to load the page but instead we load the page with php executive on command line. That is to avoid web server timing out if the process takes long. Lets duplicate index.php file, comment out maintenance section (as our shop is in maintenance mode), clear website cache and load homepage:

 

cp index.php index.dup.php

#if(file_exists($maintenanceFile)) {
#   include_once dirname(__FILE__) . ‘/errors/503.php’;
#   exit;
#}

rm -rf var/cache/*

php index.dup.php

 

If the last command didn’t throw any errors then the database had been downgraded successfully.

Tweaks

Now we need to perform a couple of tweaks in order for the newly downgraded community website to function properly:

1. You will not be able to login to backend and to customer area with the existing credentials. That is because community and enterprise password hashing algorithms are different. Lets fix it by adding this code block to app/etc/local.xml under global tags:

<global>
…..
<helpers>
   <core>
      <encryption_model>
       Enterprise_Pci_Model_Encryption
      </encryption_model>
   </core>
</helpers>
</global>

 

After that clear magento cache and you will be able to using existing credentials to login to backend and to customer area on frontend.

2. We also need to delete enterprise EAV attributes from the database manually BUT we need to keep url_key attributes:

DELETE from eav_attribute WHERE 
           (source_model LIKE ‘enterprise_%’     OR 
            backend_model LIKE ‘enterprise_%’  OR 
            attribute_code IN (‘gift_wrapping_available’,                                                              
           ‘gift_wrapping_price’)) AND attribute_code != ‘url_key’;

 

3. We need to fix url key attributes to remove any references to enterprise:

UPDATE eav_attribute 
SET backend_model=‘catalog/product_attribute_backend_urlkey’ 
WHERE attribute_code=‘url_key’ AND entity_type_id=4;

UPDATE eav_attribute 
SET backend_table=NULL WHERE attribute_code=‘url_key’;

 

Check templates

Depending on your custom theme used before with EE you might also need to remove any reference to enterprise blocks. Check out your frontend and see if layout is right - otherwise go over your theme files and fix issues.

Magento Enterprise Downgraded to Community Magento Enterprise Downgraded to Community

 

Custom Extensions

You also need to check your previously used custom extensions to make sure they work with your community edition. Some vendors provide free downgrade to community version so you might want to contact them to get extensions made for magento CE.

Summary

Now your shop should be ready for production. Check it out closely to see if you find any unusual behaviour. You should now be able to install third party community extensions be it free or paid. You should now be able to upgrade your store once new magento CE release is out. Do not forget to install security patches. You can find them on this page https://helpx.adobe.com/security/security-bulletin.html#magento

Post Scriptum

It turns out that magento enterprise full page cache (FPC) extension Enterprise_PageCache is nicely working with community edition! If you are concerned with the speed of your online store go ahead and enable that plugin after downgrade - it should function just right. I have not noticed any issues - if you do notice conflicts between enterprise FPC and magento community do not hesitate to leave comments below.

  

If you find this post interesting do not hesitate to sign up for our newsletter and join the 1461 people who receive Magento news, tips and tricks regularly.

Thank You!

 

3 thoughts on “Magento Enterprise 1.14 to Community 1.9 Downgrade”
  • Konstantin Gerasimov September 26, 2016 at 7:53 am

    JosepthR - thank you for your comment.

    you were right you had to remove enterprise files in order to use Magento CE.

  • JosephR September 23, 2016 at 11:13 am

    While this tutorial does result in a working CE version. When I try removing the app/code/core/Enterprise folder the site will no longer work. I am pretty sure you must remove all Enterprise files to be legit on the licensing. The other (yanted) article on this topic does remove that folder and it works too, but I have the issues with the url_keys on that one. Too bad there is not a definitive guide on how to do this task properly. You might want to also create a custom app/code/local/Custom/Pci/Model/Encryption.php file using the same code as the EE version for logins instead of using the EE file. Then the xml in local.xml would be



    Custom_Pci_Model_Encryption

  • Daniel January 25, 2016 at 2:15 am

    Thanks for clarifying! I understood almost everything! Could you tell me where can I Read more about Magento 1.9. I am really very interesting in it. I want to know more and dig dipper!