Upgrading Magento

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/upgrading_magento#using_ssh_shell_access


Upgrading Magento

Last modified by gbailleul@dotgee.fr on Wed, October 12, 2011 08:06
Source|Old Revisions  
TABLE OF CONTENTS
Upgrading Magento
1.4.0.1 to 1.4.1.0
1.3.2.4 to 1.4.0.1
Upgrading Magento with a full package or via SVN
Upgrading Magento using the MagentoConnect Manager
Using SSH shell access
(Warning: this guide should not be used to upgrade Magento 1.4.x to Magento 1.5.x.)

1.4.0.1 to 1.4.1.0
Using SSH, go to the root directory of your Magento installation.

./pear install magento-core/Mage_All_Latest

Then

./pear upgrade-all

Then log in to your admin section, and refresh all caches.

1.3.2.4 to 1.4.0.1
Note: If your products are not appearing in the catalog, you need to refresh the product index. With the Magento CE 1.4, there is a new option in the Inventory Configuration. Make sure that the Configuration > Inventory > Show Out of Stock items is set to “yes”, if your store used to display Out of Stock items.

Follow the procedure as mentioned in http://www.webshopapps.com/blog/2010/02/upgrading-magento-to-version-1-4-keeping-it-simple/ for a safe and nice upgrade.

Ideally, you should install a fresh copy of Magento and point it to a clone of the 1.3.2.4 DB at the installation stage. This means, a lot of configuration in the system area will go back to defaults. You have to go into the configuration area and make sure they are reset to your old settings.

Upgrading Magento with a full package or via SVN
Here are the steps for upgrading Magento with a full package or via SVN. Steps for upgrading with the MagentoConnect Manager are below.

Backup your database
- In Magento go to Admin, System → Tools → Backups
- You can use PHPMyAdmin (but this may fail due to time-limits on php scripts)
- You can export in SSH by typing...
- mysqldump -u USER -p DBNAME > dump.sql
- Reimport using mysql -u USER -p DBNAME < dump.sql
Backup all the code you modified yourself, and don’t forget to keep the original installation archive
Take care of saving the media directory that contains all the uploaded product/category images
Create a backup copy of app/etc/local.xml file
Download a new installation archive or run SVN update if you checked it out from the Magento repository
Extract and upload all the files it contains to your server
Delete var/cache and var/session directories
Point your browser to any Magento page
Database upgrades should happen automatically
You are done!
Upgrading Magento using the MagentoConnect Manager
Go to http://<YOUR_SERVER>/downloader
Log in using a user who has full permissions
Make sure to select “Clear all sessions after successful install or upgrade”
How to upgrade from tarball installation
It is possible that you will see no extensions in MagentoConnect Manager. This means that you have just uploaded the files without using PEAR downloader. In that case enter magento-core/Mage_All_Latest in the extension key field and click Install button. This will install all latest MagentoConnect core packages on top of existing files and will allow future upgrades through MagentoConnect.

Note: Make sure you installed the ‘mcrypt’ extension for PHP as magento-core requires this.

If, after the install has completed and you hit Refresh, you get a 500 error, and you get the same on your regular admin page and your storefront, you may need to change permissions on your .php files. SSH into your server, navigate to your Magento directory, and check the permissions on index.php. If may have been changed from 644 (rw-r-r) to 666 (rw-rw-rw) during the install. If so, you can issue this command to change the permissions on all your .php files to 644 (the -v switch will make it verbose, so you will see all the changes as they are made):

find -type f -name ‘*.php’ -exec chmod -v 644 {} ;

(Please note there should be a backward slash before the final semi-colon but the wiki editor sometimes takes it out.)

Reload downloader/index.php to continue.

How to upgrade all available extensions
There should be at least one extension marked in yellow, which means a higher version is available on the MagentoConnect server

Click ‘Select all upgradable extensions’
Click ‘Commit changes’
Watch the console progress for error messages
After successfully upgrading click the ‘Refresh’ button that will appear under the console frame.
How to upgrade specific extensions
For each desired extension upgrade choose ‘Upgrade’ in the dropdown
To upgrade Magento Core modules choose the following packages, and all required dependencies will be upgraded automatically:
magento-core/Interface_Adminhtml_Default
magento-core/Interface_Frontend_Default
magento-core/Interface_Install_Default
magento-core/Mage_Core_Adminhtml
magento-core/Mage_Core_Modules
How to upgrade MagentoConnect Manager
MagentoConnect Manager is not installed as a PEAR package by default. If you wish to upgrade it, you will first need to install it as a PEAR package.
Enter magento-core/Mage_Downloader in the Extension key input field and click Install.
After it is installed the first time, you can upgrade it the same way as other extensions.
You can not uninstall MagentoConnect Manager

Using SSH shell access
You need to discuss the folder/file permissions here!!!

To initialize the Magento PEAR command line registry, run the following command from the shell. Make sure you are in the Magento root folder:
./pear mage-setup .
(make sure to include the second ‘.’)
select php version (unix): MAGE_PEAR_PHP_BIN=/usr/local/bin/php; export MAGE_PEAR_PHP_BIN
for 1and1.com hosting, to use PHP5: MAGE_PEAR_PHP_BIN=/usr/local/bin/php5; export MAGE_PEAR_PHP_BIN
How to upgrade from tarball installation
If you have not used MagentoConnect or PEAR command line to install Magento, you will need to enter this command for initial PEAR installation of all Magento core modules:

./pear install magento-core/Mage_All_Latest
(You may have to upgrade pear extensions using the next step for this step to work).

How to upgrade all available extensions
./pear upgrade-all
How to upgrade specific extensions
./pear upgrade magento-core/Mage_Core_Modules magento-core/Mage_Core_Adminhtml
./pear upgrade magento-core/Interface_Adminhtml_Default magento-core/Interface_Frontend_Default magento-core/Interface_Install_Default
How to upgrade MagentoConnect Manager
If MagentoConnect Manager is not installed as a PEAR package yet:
./pear install magento-core/Mage_Downloader
After it is installed it will be upgraded just as any other extension.
How to upgrade using patch and .diff files in SSH
Clear cache (from your magento root: rm -rf var/cache/*)
Decompress 1.4.0.1-1.4.1.0 diff ball to your magento root
Use the following patch command: patch -p0 -f < 1.4.0.1-1.4.1.0.diff
Checklist
Follow the Magento Upgrade Checklist - http://inchoo.net/ecommerce/magento/standard-procedure-to-upgrade-magento-to-the-newest-version/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值