Upgrade Magento Community from 1.4 to 1.5 via SSH

February 28th, 2011 Posted by Public 3 comments on “Upgrade Magento Community from 1.4 to 1.5 via SSH”

It’s that time of year again. The new Magento stable release is out and it’s time to upgrade to the new version. I am upgrading on my staging site first and have of course made copies of everything in case it blows up.

I am upgrading to move to the “enhanced” import/export features in – supposedly I will actually be able to export my products (16,000+).

Step 1: Generate a SSH key on Mac

Navigate to “Utilities > Terminal”

In Terminal enter the following:

ssh-keygen -t dsa

Expected Response: “Generating public/private dsa key pair.”

Provide file to save the key:

Enter file in which to save the key (/Users/macuser/.ssh/id_dsa): id_dsa

Enter a passphrase (your local password – can be anything)

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

If successful:

Your identification has been saved in id_dsa.
Your public key has been saved in id_dsa.pub.
The key fingerprint is:

Step 2: Locate the id_dsa.pub key in your file directory and open it with a text editor (I used bluefish).

Copy all text and add the text to the “Public Key” configuration at your web host. This step creates the secure connection between your server and local machine.

Step 3: Load SSH key in terminal

ssh-add /Users/macuser/id_dsa

– enter passphrase

Step 4: Connect to your server

ssh <user>@<domain>.com -p<ssh port>

Step 5: If connected correctly your prompt will change the user provided in step 4. Type “ls” to list folder contents on your server.

Step 6: Download Magento
wget http://www.magentocommerce.com/downloads/assets/

Step 7: Extract tar file

tar -zxvf magento-

Step 8: list files again and look for folder “Magento”

Step 9: Copy extracted files over existing Magento installation (MAKE SURE YOU HAVE A BACKUP)
cd magento
cp -rf * ../public_html

Step 10: Try to load the site at your URL. If you have permissions issues or 500 errors try these fixes:
– I also had to look at the error logs in my cpanel to figure out the folder that had too high of permissions. For me it was ‘erorrs’ t0 fix I did a chmod 755 on that folder.

Step 11: Load the front end URL for your store to check to see if your template files work in version 1.5+
I had the following error:
Fatal error: Call to a member function toHtml() on a non-object in /home/../public_html/app/code/core/Mage/Core/Model/Layout.php on line 529
– Googled Fix: http://screencastworld.com/2010/07/magento/how-to-fix/php-fatal-error-call-to-a-member-function-tohtml-on-a-non-object-in-layout-php-on-line-529
– This worked for me

Step 12: Login to your administrative interface (usually http://<domain>/admin)
– Once you login you should see version in the footer (upgrade is done)

Step 13: Clean up the temp files

cd ../
rm -rf magento
rm magento-

Much thanks to “veracious” in the Magento Forums for this helpful post: http://www.magentocommerce.com/boards/viewthread/219570/P30/

Tags: , ,
  • http://pulse.yahoo.com/_VQGJ3BP22COSNQJTCVXK6QOUUI EricB

    Woot woot on my own info! First post! Don’t forget if you have a problem with the copy (cp) command (many distros use an alias out of the box on cp) to use this command to make cp work as intended:
    unalias cp

    • Anonymous

      EricB – Thanks again for the information. To be clear – I am in no way claiming this is my own info – just re-posting to help others find the specific post that actually works in multiple pages of forum posts.

  • GetMagented

    Thanks for this nice tutorial! Magento has some major improvements on performance and features.

    We set it up for a test environment, ( http://www.getmagented.nl ). Before going to the frontend in step 10, I first deleted app/etc/local.xml to reinstall Magento because my database tables were not all set up correctly during the SSH install.