Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Downgrade script for magento EE to CE
#!/bin/bash
#first param = db user, second param = db name
rm -rf app/code/core/Enterprise
rm -rf downloader/template/enterprise
rm -rf app/design/install/default/enterprise
rm -rf app/design/frontend/enterprise
rm -rf app/design/adminhtml/default/default/layout/enterprise
rm -rf app/design/adminhtml/default/default/template/enterprise
rm -f app/locale/en_US/Enterprise_*.xml
rm -rf skin/adminhtml/default/enterprise
rm -rf skin/frontend/enterprise
rm -rf skin/install/default/enterprise
rm -f app/etc/modules/Enterprise_*.xml
rm -f app/etc/enterprise.xml
rm -rf app/locale/en_US/template/email/enterprise/
rm -rf js/enterprise
rm -rf errors/enterprise
rm -f LICENSE_EE.txt
rm -f LICENSE_EE.html
mysql -u $1 -p -C $2 <<QUERY_INPUT
DELETE FROM eav_attribute WHERE source_model LIKE 'enterprise_%';
DELETE FROM eav_attribute WHERE backend_model LIKE 'enterprise_%';
DELETE FROM eav_attribute WHERE attribute_code IN ('gift_wrapping_available', 'gift_wrapping_price');
UPDATE eav_attribute SET backend_table = NULL WHERE attribute_code = 'url_key';
TRUNCATE TABLE core_url_rewrite;
SELECT @entity_type_id:=entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product';
SELECT @attribute_id:=attribute_id FROM eav_attribute WHERE attribute_code = 'url_key' AND entity_type_id = @entity_type_id;
DELETE FROM cron_schedule WHERE job_code like 'enterprise%';
DELETE FROM core_config_data where path like '%enterprise%'
QUERY_INPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.