Last active
February 11, 2025 20:03
-
-
Save redesigned/6169208 to your computer and use it in GitHub Desktop.
Magneto Upgrading Commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After upgrading: | |
delete all files except config.xml from the following directory: | |
/app/code/core/Mage/GoogleCheckout/etc | |
go to www.mywebsite/downloader then reinstall the package called Lib_Varien | |
go to /app/design/frontend/base/default/template/checkout/onepage/ file payment.phtml | |
(add this id to the fieldset) | |
<fieldset id="checkout-payment-method-load"> | |
<?php echo $this->getChildHtml('methods') ?> | |
</fieldset> | |
If their theme overrides /checkout/cart.php add the formkey to the top of the cart form: | |
<?php echo $this->getChildHtml('form_before') ?> | |
<?php echo $this->getBlockHtml('formkey'); ?> | |
In fact add the formkey block to the top of any form their template overrides. | |
<?php echo $this->getBlockHtml('formkey'); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reindex All: | |
php shell/indexer.php reindexall | |
Clear Caches: | |
rm -rf ./downloader/pearlib/cache/* ./downloader/pearlib/download/* | |
rm -rf ./var/cache/* ./var/session/* ./var/report/* ./var/log/* | |
rm -rf ./media/tmp/* ./app/code/core/Zend/Cache/* ./var/tmp/* | |
Fix Permissions: | |
find . -type d -exec chmod 755 {} \; | |
find . -type f -exec chmod 644 {} \; | |
chmod o+w var var/.htaccess app/etc | |
chmod 550 ./lib/pear | |
chmod -R o+w media | |
chmod 550 ./mage | |
Backup: | |
tar cvfz backup_files.tar.gz ./domainname.com | |
mysqldump --add-drop-table --user username --password=XXXXXX databasename | gzip > backup_database.sql.gz | |
Upgrade or Install: | |
cp .htaccess .htaccess.PreUpgrade | |
cp index.php index.php.PreUpgrade | |
wget http://redesigned.com/magento/magento-1.9.3.0.tar.gz | |
tar -zxvf magento-1.9.3.0.tar.gz | |
cp -rf magento/* magento/.htaccess . | |
rm -rf magento | |
rm magento-1.9.3.0.tar.gz | |
rm -rf ./downloader/pearlib/cache/* ./downloader/pearlib/download/* ./var/cache/* ./var/session/* ./var/report/* ./media/tmp/* ./app/code/core/Zend/Cache/* | |
find . -type d -exec chmod 755 {} \; | |
find . -type f -exec chmod 644 {} \; | |
chmod o+w var var/.htaccess app/etc | |
chmod 550 ./lib/pear | |
chmod -R o+w media | |
chmod 550 ./mage | |
rm -rf ./downloader/pearlib/cache/* ./downloader/pearlib/download/* | |
rm -rf ./var/cache/* ./var/session/* ./var/report/* ./var/log/* | |
rm -rf ./media/tmp/* ./app/code/core/Zend/Cache/* ./var/tmp/* | |
Alternate: | |
chmod 550 ./mage | |
./mage mage-setup . | |
./mage sync | |
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force | |
./mage upgrade-all --force | |
rm -rf downloader/.cache/* downloader/pearlib/cache/* downloader/pearlib/download/* var/cache/* | |
php shell/indexer.php reindexall | |
Previous Versions: | |
wget http://www.magentocommerce.com/downloads/assets/1.9.1.1/magento-1.9.1.1.tar.gz | |
tar -zxvf magento-1.9.1.1.tar.gz | |
cp -rf magento/* magento/.htaccess . | |
rm -rf magento | |
rm magento-1.9.1.1.tar.gz | |
wget http://www.magentocommerce.com/downloads/assets/1.9.0.1/magento-1.9.0.1.tar.gz | |
tar -zxvf magento-1.9.0.1.tar.gz | |
cp -rf magento/* magento/.htaccess . | |
rm -rf magento | |
rm magento-1.9.0.1.tar.gz | |
wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz | |
tar -zxvf magento-1.8.1.0.tar.gz | |
cp -rf magento/* magento/.htaccess . | |
rm -rf magento | |
rm magento-1.8.1.0.tar.gz | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Run this command to find tables with engine type MyISAM. */ | |
/* It will generate SQL to run, run all except catalogsearch_fulltext */ | |
SELECT CONCAT('ALTER TABLE ', table_name, ' ENGINE=InnoDB;') AS sql_statements | |
FROM information_schema.tables AS tb | |
WHERE table_schema = 'magento' | |
AND `ENGINE` = 'MyISAM' | |
AND `TABLE_TYPE` = 'BASE TABLE' | |
ORDER BY table_name; | |
/* If Pre 1.6 run this */ | |
ALTER TABLE sales_flat_order_item DROP INDEX IDX_ORDER , ADD INDEX IDX_SALES_FLAT_ORDER_ITEM_ORDER_ID ( order_id ) | |
ALTER TABLE sales_flat_order_item DROP INDEX IDX_STORE_ID , ADD INDEX IDX_SALES_FLAT_ORDER_ITEM_STORE_ID ( store_id ) | |
ALTER TABLE sales_flat_order_item DROP INDEX IDX_PRODUCT_ID | |
/* Run this */ | |
SET NAMES utf8; | |
SET FOREIGN_KEY_CHECKS=0; | |
SET UNIQUE_CHECKS=0; | |
/* Run this */ | |
Truncate table dataflow_batch_export; | |
Truncate table dataflow_batch_import; | |
Truncate table log_customer; | |
Truncate table log_quote; | |
Truncate table log_summary; | |
Truncate table log_summary_type; | |
Truncate table log_url; | |
Truncate table log_url_info; | |
Truncate table log_visitor; | |
Truncate table log_visitor_info; | |
Truncate table log_visitor_online; | |
Truncate table report_viewed_product_index; | |
Truncate table report_compared_product_index; | |
Truncate table report_event; | |
Truncate table index_event; | |
Truncate table catalog_compare_item; | |
DROP TABLE `catalog_product_index_website`; | |
CREATE TABLE `catalog_product_index_website` ( | |
`website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID', | |
`website_date` date DEFAULT NULL COMMENT 'Website Date', | |
`rate` float DEFAULT '1' COMMENT 'Rate', | |
PRIMARY KEY (`website_id`), | |
KEY `IDX_CATALOG_PRODUCT_INDEX_WEBSITE_WEBSITE_DATE` (`website_date`), | |
CONSTRAINT `FK_CAT_PRD_IDX_WS_WS_ID_CORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Catalog Product Website Index Table'; | |
/* Call index.php to execute upgrde */ | |
/* After upgrade is complete run this */ | |
SET FOREIGN_KEY_CHECKS=1; | |
SET UNIQUE_CHECKS=1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to upgrade magento version 1.9.0.1 to 1.9.2.1 and of thats issue then it will be suffice to update only 1.9.1.0. Please help