First things first to upgrade your website you need to create a new folder on your current server called /magento or use a development server or another new server to move your website to. Do no do the upgrade on your live server. You need to know ssh to do this upgrade.
1. Make a backup of your website using either control panel backup or your other hosting backup tool.
Working on the old server
create a mysqldump of your current database using ssh. Login to ssh on the current server and go to the directory where magento is installed. The ssh code to go to your directory will be different. Some are cd /var/www/vhosts and some are others. Check with your web host for the absolute path to your directory.
once your in Enter the code below and replace with your username and databasename from the old server. If you don’t have this info download your app/etc/local.xml file from the original server and find it in there.
mysqldump -p -u username databasename > database.sql
it will ask for password
make a .zip backup of your entire website. It’s going to take a long time so just let it go. It wont mess up. Enter the code below.
zip -r websitebackup.zip *
Now your done on the old server.
Working on the new server.
create a new blank database on your new server and notepad the database name, username and password.
upload the files websitebackup.zip and database.sql to your new server main directory where you want to install magento using ftp.
mysql up the old database to the new blank database replacing the username and databasename with your new database info using ssh. enter the code below
mysql -p -u username databasename < database.sql 7. You need to login to your phpmyadmin and change the default web secure and unsecure urls of magento. login to phpmyadmin find and click on the core_config_data table you'll see the two rows for web/unsecure/base_url and web/secure/base_url click the edit icon and change them to your new website location on the new server. 9. I changed my default theme back to the default magento theme before proceeding. I changed it back after the whole process was done using the magento admin. login to phpmyadmin find and click on the core_config_data table again. You need to find every place it says your theme name and replace it with the word default. It was like 5 or 6 places. 10. Now you need to unzip the websitebackup.zip file I like to do this using the file manager within my hosting control panel. It's the easiest way so you don't have to change file/folder permissions after. You can also do this using ssh by entering unzip websitebackup.zip * but try and do it using file manager from hosting account. 11. Clear the cache using ssh enter on the new server rm -rf var/cache/* 12. You need to now change the /etc/local.xml and etc/config.xml files to connect to your new database. Go to app/etc/config.xml and app/etc/local.xml download both files to your computer using ftp. change the database name, username and passwords on both files to point to your new server database. 13. Set your file permissions using ssh You need to know what your owner.group is to get this. I login to ftp and go to the main directory of magento. Look at the owner/group column. Enter the code chown -R owner.group *
Now It’s Time for the Upgrade!
You need to enable chmod on the mage file using ssh enter the code
chmod 550 mage
Now setup mage in ssh
Now install the new magento enter this into ssh
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest –force
This code will install the latest version of magento which is 1.8
Now remove some cache again using ssh enter the codes
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
rm -rf var/cache
Restore owner.group again
Set your file permissions using ssh You need to know what your owner.group is to get this. I login to ftp and go to the main directory of magento. Look at the owner/group column. Enter the code
chown -R owner.group *
Now visit your new website! If it works your good! But mine did not at this point my website and website admin were giving me error messages. I found a solution by upgrading the database using ssh.
Enter the following code into ssh
php -f ./index.php
This took a very long time don’t know why but finished with no errors.
After that I deleted the cache one more time.
rm -rf var/cache
I also logged into ftp to the /var folder and removed cache, sessions, locks.
I was now able to view my website and website admin perfectly fine with the new website using 188.8.131.52
I hope this helps someone cause it took me 7 hours to figure it all out!