Friday, November 25, 2011

Magneto Upgrade

Now Upgrading Magneto became easy

Note: If you want to upgrade Magento from 1.3 to 1.6 or 1.4 to 1.6 or 1.5 to 1.6 follow the same procedure

Follow the steps



1. Download the latest version of Magento from here.

2. Disallow access to your site if doing the upgrade on a production environment (this is why you should do this on a test environment)

$ mv .htaccess .htaccess-bkp
$ cp magento/.htaccess .
$ cp .htaccess .htaccess-new
In your new .htaccess change the Order Allow to (at the bottom of file):

#Order allow,deny  
#Allow from all
Order deny,allow
Deny from all
Allow from YOUR IP ADDRESS

3. Flush all caches(always useful)

$ rm -rf var/cache/
$ rm -rf downloader/pearlib/cache/  downloader/pearlib/download/

4. Remove the ‘downloader’ and ‘app/design/frontend/base’ directory

$ rm -rf downloader
$ rm -rf app/design/frontend/base



5. Copy ‘downloader’ and ‘app/design/frontend/base’ folder from magento-1.5.1.0

$ cp -a magento/downloader .
$ cp -a magento/app/design/frontend/base/ app/design/frontend/

6. Install/get ‘mage’.

$ cp magento/mage .
$ chmod 550 ./mage

7. Do the upgrade

$ ./mage mage-setup .
$ ./mage sync --force
$ ./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
$ rm -rf var/cache/  var/session/
$ rm -rf downloader/pearlib/cache/  downloader/pearlib/download/
$ chmod 755 mage
$ php shell/indexer.php reindexall
$ ./mage upgrade-all --force
( NOTE: you may skip this 'upgrade-all' step if you just went ahead and did the following:
<code>
$ yes | cp -Rf magento/ .  #this copies over all the magento files you extracted over your current installation

8. Visit the home page of your upgraded site. This will trigger the magento upgrade process.

This can take anywhere from few minutes, so be patient. You’ll also likely get a browser error before the upgrade is done–don’t worry about it, it’s normal, and keep waiting…

Do the following and watch mysql process until it stops using up high cpu usage–once it does, you’ll know the database upgrade is done.

9. Login to the /admin section of your site and mage sure the version number reflects the version you just upgraded to.

10. Change back your .htaccess to original value

$ cp .htaccess-new .htaccess

11. Set the proper file permissions

$ find . -type f -exec chmod 644 {} ;
$ find . -type d -exec chmod 777 {} ;

$ chmod -R 777 downloader
$ chmod 550 mage
$ chmod o+w var var/.htaccess app/etc
$ chmod -R o+w media

11. You’ll probably want to use a file comparison program to see the difference in template files

download the latest version from magento connect if possible
if not possible and you made your own template, then the best thing to do is to DELETE all the unecessary custom template files from your custom template directory, and only keep the crucial ones.
Following use something like Beyond Compare and file compare between the /base/default
app/design/frontend/base/default
and
/app/design/frontend/default/CUSTOM

12. Fix magento URLs

In the admin interface admin/system_config/edit/section/catalog/ set the following under Search Engine Optimization:

Autogenerated Site Map: enable
Popular Search Terms: enable
Product URL Suffix: blank
Category URL Suffix: blank
Use Categories Path for Product URLs: yes # or no depends on who you ask
Create Permanent Redirect for old URLs if Url key changed: yes
Page Title Separator: -
Use Canonical Link Meta Tag For Categories : yes
Use Canonical Link Meta Tag For Products: yes
Now re-index your url rewrite data in admin/process/list/: Catalog URL Rewrites

Or in SSH:

php shell/indexer.php reindexall

No comments:

Post a Comment

Thankyou for your Comments

LinkWithin

Blog has moved, searching new blog...