Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 3
1.5.0.1: upgrading from 1.3.1
 
BritishNaturism
Jr. Member
 
Total Posts:  4
Joined:  2010-09-03
 

Whilst waiting for the 1.5 forum to be fixed…

I have never done an upgrade to magento at all and wondered if anyone can suggest the best waty to go about either upgrading 1.3.1 to 1.5.0.1 or doing a clean install and then migrating all of the settings and content please?

 
Magento Community Magento Community
Magento Community
Magento Community
 
CT Schubert
Sr. Member
 
Avatar
Total Posts:  197
Joined:  2008-10-08
Southern California
 

I am in the same boat, more or less, as you. I have a couple of clients who are currently running 1.3.2.4 and need to upgrade to 1.5.0.1.

At first I was going to just do a clean 1.5.0.1 install and then export all products (assuming your product list is manageable and under a few hundred) as well as export customers and import into the new store....and just do the leg work in terms of converting the template, re-configuring everything, etc.

But a few things came up that made this particular way unfeasible. Mainly, no way to export/import orders without the possibility of purchasing a $100-200+ order export module and even then I wasn’t sure if it would solve that issue. Another major issue was one client had close to 3,000 products. No way was I going to try to do those again, assign them to categories, etc.

I came across another post here in the forums where someone suggests a particular way of doing this and after trying it, it seems to work pretty well. Albeit, there are some issues and I am still working out some broken stuff, but nothing major. Plus, if you do this first in “staging area” while the live site continues to run, you can work on it until you are satisfied and then do a quick switch.

Let me provide you with a quick run-down of what I did and if you have any questions, please let me know either in here or via PM.

You will need knowledge of usage of CLI (command-line interface) via SSH (Terminal app in Mac, putty in PC, etc)

1. Make a full backup of your current site. I usually login via SSH and create a backup of the entire store.

tar -cvf backup.tar directory_your_store_is_in/
2. Dump your entire live database to an SQL file via CLI (command line interface) in SSH
mysqldump -h DBHOST -u DBUSER -p DBNAME data.sql
It will prompt you for the database password, which you can obtain inside the /app/etc/local.xml file

Ok, now you have your store backed up and the database backed up. In case anything happens, worst case scenario, you can restore it all.

3. Create a sub-directory within your main store directory, call it “staging” or whatever you like
4. Create a new, blank database and assign it a new user/pass
5. Take your recently dumped SQL file and upload it into the new database

mysql -h DBHOST -u DBUSER -p DBNAME data.sql
Again, it will prompt for the password, this time of the new database

6. Once you have the data imported to the new database, you can then do a fresh install of Magento 1.5.0.1

7. Move into your new “staging” directory and run the following commands

wget http://www.magentocommerce.com/downloads/assets/1.5.0.1/magento-1.5.0.1.tar.gz
tar -zxvf magento-1.5.0.1.tar.gz
mv magento
/* magento/.htaccess .
chmod o+w var var/.htaccess app/etc
chmod -R o+w media
chmod 500 mage
./mage mage-setup .
rm -rf magento/ magento-1.5.0.1.tar.gz

8. To help you out while installing, as errors are sure to happen, go into the new “staging” directory via FTP and rename the file “/errors/local.xml.sample” to “local.xml”. This will make it so Magento actually tells you what is breaking instead of just giving you some random error code that you have to dig and lookup in the error logs.

9. Ok, now you have 1.5.0.1 files installed into a new directory and a database waiting to be “upgraded”. Go to your browser and go to that new directory (ie. http://www.yourdomain.com/staging/)

This will load the Magento install. Go through the steps, plug in your new database info, etc. When it asks you to create a new admin account, you’ll need to setup a different one than your current as it is currently in the database and won’t accept it. (ie. the default is “admin”, but since that data was previously uploaded into this database and it already exists, you’ll need to setup a different admin account).

You MAY run into an error or two while trying to install. I ran into an error w/ the Find Feed portion of Magento. If this happens, contact me and I’ll let you know what I did.

Once you have successfully ran the install, you should be able to login to the backend of the system. At this time you should be able to view all of your customers, all of your orders and all of your products.

Now...the products are there, but the images are not…

Back to the command-line. Go into your live store directory and copy everything within the media folder into the media folder of the staging site.

cp -R media/* staging/media
(please keep in mind I am assuming your current live store is installed in the root folder of your site)

At this point, you should have products w/ images, categories, orders, sales data, customers, discount codes, etc.

Now you’ll want to copy your custom theme folder over to the new staging folder (design and skin folders). This will likely break the site and you’ll need to make some changes if your theme is custom and/or 1.3x based. If you purchased your theme from someone, see if they have a 1.4x version available or at least can provide you with the changes that need to be made.

The one main change you’ll need to make sure you do is edit the /layout/page.xml file of your custom theme and find the line

<block type="core/profiler" output="toHtml"/>

change it to

<block type="core/profiler" output="toHtml" name="core_profiler"/>

You will probably find that line twice and need to change it in both place within the page.xml

At this point, you can go in and start installing extensions via the Connect Manager. If it was a previous module you had, chances are the settings you had for it will still exist in the database and you won’t need to make too many changes regarding it.

Well, I hope that gets your started. I’m finishing up my first upgrade from 1.3.2.4 to 1.5.0.1 and going to working on another soon, so I may come across some more info that may be helpful.

Anyone else feel free to chime in here on this.

Thanks!
CT Schubert

Sources & Credit:
http://www.crucialwebhost.com/kb/article/installing-magento-via-ssh/
http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
http://www.magentocommerce.com/boards/viewthread/219629/

 
Magento Community Magento Community
Magento Community
Magento Community
 
BritishNaturism
Jr. Member
 
Total Posts:  4
Joined:  2010-09-03
 

Wow thank you very much.  This looks like just what I need so i’ll give it a go and get back to you if i get stuck.

grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

Hello,

Thank you, CT Schubert for this great tutorial, I want to update my magento from 1.3.2.4 to 1.4.2.0 but I have a problem.

I done what you write, but I am at the chapter 7 and I have problem.

In SSH when I execute: chmod 500 mage
I have this error reponse: chmod: can not access `Mage ‘: No such file or directory type
For imformation, I execute this command in the folder www/

I am French and I hope you understand my English.

Thank you to help me.

Guillaume.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CT Schubert
Sr. Member
 
Avatar
Total Posts:  197
Joined:  2008-10-08
Southern California
 

The file “mage” is specifically for version 1.5.x. I believe you will still want to run this command

chmod 500 pear

Also, after your chmod the pear file, you’ll want to run this command instead of the in the original post

./pear mage-setup .
 
Magento Community Magento Community
Magento Community
Magento Community
 
mpikounis
Member
 
Total Posts:  67
Joined:  2009-01-26
Athens, Greece
 

Excellent post CT Schubert. May I ask how you plan to do the switch from staging to live when you are satisfied with the changes in the staging area? Will a simple import of the 1.3.x database and a directory rename suffice? How do you tell magento that the db connected to it is from a different version and need upgrading?

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

Hello,

Thank you for your answer.

In fact in the release 1.4.2.0, there is no file mage but a file pear

So I tried the 2 command lines:
chmod 500 pear = OK
./pear mage-setup . = I had this error message: Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/xxx/www/downloader/pearlib/php/System.php on line 400

Thank you so much to help me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

Hi,

You say in the chapter 8 to rename the file “/errors/local.xml.sample” to “local.xml = OK

But my question is, do we have something to do with the 3 others sample files:
www/php.ini.sample
www/index.php.sample
www/.htaccess.sample

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CT Schubert
Sr. Member
 
Avatar
Total Posts:  197
Joined:  2008-10-08
Southern California
 
guillaume7684 - 21 February 2011 10:43 AM

Hi,

You say in the chapter 8 to rename the file “/errors/local.xml.sample” to “local.xml = OK

But my question is, do we have something to do with the 3 others sample files:
www/php.ini.sample
www/index.php.sample
www/.htaccess.sample


Thank you.

No, those files are simply examples. You can choose to delete them or leave them alone, it doesn’t matter.

The file local.xml.sample in the errors folder is named that to prevent the display of the actual Magento error on a live site for security reasons. It is for debugging purposes (or at least should be only used for that purpose).

So you will want to remove the .sample from the /errors/local.xml.sample during the install and configuration and setup of the new store. Once the site has gone live and everything is working properly, you’ll want to re-add the .sample to the end of it.

What that will do is instead of outputting the full text of the error being produced, instead Magento will just throw out an error code # which you will only have access to in the /var/report/ folder

 
Magento Community Magento Community
Magento Community
Magento Community
 
CT Schubert
Sr. Member
 
Avatar
Total Posts:  197
Joined:  2008-10-08
Southern California
 
guillaume7684 - 21 February 2011 10:38 AM

Hello,

Thank you for your answer.

In fact in the release 1.4.2.0, there is no file mage but a file pear

So I tried the 2 command lines:
chmod 500 pear = OK
./pear mage-setup . = I had this error message: Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/xxx/www/downloader/pearlib/php/System.php on line 400

Thank you so much to help me.

If you don’t mind explaining, what was the exact process you did, line by line to get to that point?

 
Magento Community Magento Community
Magento Community
Magento Community
 
CT Schubert
Sr. Member
 
Avatar
Total Posts:  197
Joined:  2008-10-08
Southern California
 
mpikounis - 20 February 2011 10:46 PM

Excellent post CT Schubert. May I ask how you plan to do the switch from staging to live when you are satisfied with the changes in the staging area? Will a simple import of the 1.3.x database and a directory rename suffice? How do you tell magento that the db connected to it is from a different version and need upgrading?

Once you are satisfied w/ the staging install, you will want to do the following.

Make sure you do this at a time that you are sure no one will be shopping on your store, perhaps really late at night or really early in the morning. Or put up a temporary index page. Either way, should be down for just a few minutes.

1. Create a new folder in the root called “backup” and copy your entire live store into that folder
2. Delete all of the files for the live store wherever they currently reside (again, MAKE SURE you have them copied to a backup folder just in case)
3. Move all of the files from the staging area to the folder the live site was in (so if the live site was in /public_html/ then move them there)
4. Login to phpmyadmin or whatever interface you use to access your databases and edit the core_config_data table and point the unsecure and secure urls to the new path (so if they were currently set to www.domain.com/staging/, rename them to www.domain.com/)
5. That should be it. Unless you have absolute paths being used anywhere in your template or your CSS, you shouldn’t have any template issues
6. Login to your admin and refresh all of the cache and re-index everything. Generate your sitemap, etc. Go through all the settings and make sure everything is fine.

Some side notes. If you were using a shipping extension that required a CSV file, make sure to re-upload that just in case. Run some verifications once the site is live. Signup as a new user, try to do a full checkout w/ payment going through (I had to re-input API/Transaction keys for one clients merchant account). Check to make sure existing customer accounts are working w/ passwords ,etc.

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 
CT Schubert - 22 February 2011 05:05 PM

guillaume7684 - 21 February 2011 10:38 AM
Hello,

Thank you for your answer.

In fact in the release 1.4.2.0, there is no file mage but a file pear

So I tried the 2 command lines:
chmod 500 pear = OK
./pear mage-setup . = I had this error message: Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/xxx/www/downloader/pearlib/php/System.php on line 400

Thank you so much to help me.

If you don’t mind explaining, what was the exact process you did, line by line to get to that point?

Hi,

I have this error message in SSH panel, when I execute this command mentioned in the chapter 7.
I exactly followed your protocol.

Thank you so much.

Guillaume.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CT Schubert
Sr. Member
 
Avatar
Total Posts:  197
Joined:  2008-10-08
Southern California
 
guillaume7684 - 22 February 2011 06:19 PM

CT Schubert - 22 February 2011 05:05 PM
guillaume7684 - 21 February 2011 10:38 AM
Hello,

Thank you for your answer.

In fact in the release 1.4.2.0, there is no file mage but a file pear

So I tried the 2 command lines:
chmod 500 pear = OK
./pear mage-setup . = I had this error message: Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/xxx/www/downloader/pearlib/php/System.php on line 400

Thank you so much to help me.

If you don’t mind explaining, what was the exact process you did, line by line to get to that point?

Hi,

I have this error message in SSH panel, when I execute this command mentioned in the chapter 7.
I exactly followed your protocol.

Thank you so much.

Guillaume.

You followed the steps, except for the first two lines you did:

wget http://www.magentocommerce.com/downloads/assets/1.4.2.0/magento-1.4.2.0.tar.gz
tar -zxvf magento-1.4.2.0.tar.gz

Right?

If that is the case, try to download the Magento 1.4.2 package directly from the Magento website, located here:
http://www.magentocommerce.com/download

Uncompress it and manually FTP the downloader folder into your install directory. Then try to run that command line again.

Thanks
CT Schubert

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

Hi,

No, I exactly followed your protocol with the ssh command wget.

So, I can try to upload it via FTP.

I found that in the forum: http://www.magentocommerce.com/boards/viewthread/43790/#t222042
Do you think, I can try that?

Thank you so much for your help.

Guillaume.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CT Schubert
Sr. Member
 
Avatar
Total Posts:  197
Joined:  2008-10-08
Southern California
 
guillaume7684 - 22 February 2011 07:07 PM

Hi,

No, I exactly followed your protocol with the ssh command wget.

So, I can try to upload it via FTP.

I found that in the forum: http://www.magentocommerce.com/boards/viewthread/43790/#t222042
Do you think, I can try that?

Thank you so much for your help.

Guillaume.

Please keep in mind that my steps were for upgrading to 1.5.0.1, NOT for upgrading to 1.4.2. So you need to be mindful of that and that is possibly what is causing your issues.

You could try the solution in that thread, but you’ll need to know where the path is on your server.

You need to go back and substitute 1.4.2 for 1.5.0.1 in my instructions if you are wanting to upgrade to 1.4.2 (although why not just upgrade to 1.5.0.1?)

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

I don’t want to install 1.5.0.1 now, because there are the 3 extensions I want to install who are not yet compatible with this release.
- French translation
- Owebia2
- SIPS ATOS

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3