Dear friends, I have the following question:
Is it possible to upgrade my opencart from 1.5.4 version to 2.x.x without losing any information (descriptions, pictures, etc.)? Please give me some tips and hints to do it.
I searched the forum for such a topic and I couldn't find.
I saw only "errors with upgrading" topics.
Thanks in advance!
Regards.
I would avoid doing this right now. It's hard to type up the 'steps' right now because they are different for every 2.x version right now and none of it is straightforward. Is your current shop working well for you? If so, there's no need to rush to 2.x. 1.5.6.4 is very stable though and a lot easier to upgrade to.
Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhosting.com
Active Member
Hi,
I have listed out the main steps that I followed during the manual upgrade of a couple of shops from OC_1.5.x to OC_2.1.0.1. You will need to be comfortable with operating directly on the database - if not, don't even consider this method. I'm sure that I've inadvertently left out some steps as well so you may need to fill in some gaps.
Backup database from live shop
Using PHP on WAMP, create empty database for OC_2.x
Using WAMP on PC, install latest OC version locally which will create tables in the empty database
Using PHP on WAMP, create another empty database and import the 1.5.x backup file - this will be the upgrade source
Using PHP on WAMP, extract required data from 1.5.x database as follows (I didn't have any extensions that I wanted to migrate)
Export these tables individually, with the listed changes
Export oc_address without company_id, tax_id.
Export oc_category without link_to field
Export oc_customer_group; only fields customer_group_id, approval, sort_order
Export oc_order without payment_company_id, payment_tax_id fields
Export oc_order_total without text field
Export oc_product and change data/ to catalog/ using Microsoft Notepad
Export oc_product_description; UPDATE ' oc_product_description' SET 'meta_title'=name where 1; (you will need to create a new column meta_title first, with the same attributes as name)
Export oc_product_image and change data/ to catalog/ using Microsoft Notepad
Export oc_product_option and change field option_value to value using Microsoft Notepad
Export these tables as a single file
Export attribute_* (* means all fields beginning attribute_)
Export oc_category_description
Export oc_category_path
Export oc_category_to_store
Export oc_customer
Export oc_customer_group_description
Export oc_geo_zone
Export oc_information_* (* means all fields beginning information_)
Export oc_option_*
Export oc_order_history
Export oc_order_option
Export oc_order_product
Export oc_product_attribute
Export oc_product_option_value
Export oc_product_reward
Export oc_product_to_category
Export oc_product_to_store
Export oc_tax_class
Export oc_tax_rate
Export oc_tax_rate_to_customer
Export oc_url_alias
Using PHP on WAMP, empty the OC_2 tables that you don't want any data in - you can use the following script
TRUNCATE `oc_address`;
TRUNCATE `oc_api`;
TRUNCATE `oc_attribute`;
TRUNCATE `oc_attribute_description`;
TRUNCATE `oc_attribute_group`;
TRUNCATE `oc_attribute_group_description`;
TRUNCATE `oc_category`;
TRUNCATE `oc_category_description`;
TRUNCATE `oc_category_to_store`;
TRUNCATE `oc_customer`;
TRUNCATE `oc_customer_group`;
TRUNCATE `oc_customer_group_description`;
TRUNCATE `oc_customer_ip`;
TRUNCATE `oc_geo_zone`;
TRUNCATE `oc_information`;
TRUNCATE `oc_information_description`;
TRUNCATE `oc_information_to_store`;
TRUNCATE `oc_option`;
TRUNCATE `oc_option_description`;
TRUNCATE `oc_option_value`;
TRUNCATE `oc_option_value_description`;
TRUNCATE `oc_order`;
TRUNCATE `oc_order_history`;
TRUNCATE `oc_order_option`;
TRUNCATE `oc_order_product`;
TRUNCATE `oc_order_total`;
TRUNCATE `oc_product`;
TRUNCATE `oc_product_attribute`;
TRUNCATE `oc_product_description`;
TRUNCATE `oc_product_image`;
TRUNCATE `oc_product_option`;
TRUNCATE `oc_product_option_value`;
TRUNCATE `oc_product_reward`;
TRUNCATE `oc_product_special`;
TRUNCATE `oc_product_to_category`;
TRUNCATE `oc_product_to_store`;
TRUNCATE `oc_stock_status`;
TRUNCATE `oc_tax_class`;
TRUNCATE `oc_tax_rate`;
TRUNCATE `oc_tax_rate_to_customer_group`;
TRUNCATE `oc_url_alias`;
Using PHP on WAMP, import all of the data exported above into the OC_2 database
Move your image files from image/data to image/catalog (or download them from your shop into WAMP)
Using localhost on WAMP, you should now see your upgraded shop. There will be various issues, which for me were mainly in Admin/settings as I couldn't import these from 1.5.x, but in the main this just requires a bit of effort to replicate the settings. Just remember, if you want to run through the process a few times, back up the settings table in OC_2 so that you only need to make the changes once.
When you are happy, export the OC_2 database, create a new OC_2 database on the web site, install OC_2 on your live site, drop all the OC_2 tables and import the database from your PC, move the images from data to catalog, and everything should work as expected.
With the live site, I added 156 to the name of all the files and directories in the top level directory before I uploaded and ran the OC_2 install script, so I could revert to the previous version quickly. I also left the 1.5.x database on the web server.
I have listed out the main steps that I followed during the manual upgrade of a couple of shops from OC_1.5.x to OC_2.1.0.1. You will need to be comfortable with operating directly on the database - if not, don't even consider this method. I'm sure that I've inadvertently left out some steps as well so you may need to fill in some gaps.
Backup database from live shop
Using PHP on WAMP, create empty database for OC_2.x
Using WAMP on PC, install latest OC version locally which will create tables in the empty database
Using PHP on WAMP, create another empty database and import the 1.5.x backup file - this will be the upgrade source
Using PHP on WAMP, extract required data from 1.5.x database as follows (I didn't have any extensions that I wanted to migrate)
Export these tables individually, with the listed changes
Export oc_address without company_id, tax_id.
Export oc_category without link_to field
Export oc_customer_group; only fields customer_group_id, approval, sort_order
Export oc_order without payment_company_id, payment_tax_id fields
Export oc_order_total without text field
Export oc_product and change data/ to catalog/ using Microsoft Notepad
Export oc_product_description; UPDATE ' oc_product_description' SET 'meta_title'=name where 1; (you will need to create a new column meta_title first, with the same attributes as name)
Export oc_product_image and change data/ to catalog/ using Microsoft Notepad
Export oc_product_option and change field option_value to value using Microsoft Notepad
Export these tables as a single file
Export attribute_* (* means all fields beginning attribute_)
Export oc_category_description
Export oc_category_path
Export oc_category_to_store
Export oc_customer
Export oc_customer_group_description
Export oc_geo_zone
Export oc_information_* (* means all fields beginning information_)
Export oc_option_*
Export oc_order_history
Export oc_order_option
Export oc_order_product
Export oc_product_attribute
Export oc_product_option_value
Export oc_product_reward
Export oc_product_to_category
Export oc_product_to_store
Export oc_tax_class
Export oc_tax_rate
Export oc_tax_rate_to_customer
Export oc_url_alias
Using PHP on WAMP, empty the OC_2 tables that you don't want any data in - you can use the following script
TRUNCATE `oc_address`;
TRUNCATE `oc_api`;
TRUNCATE `oc_attribute`;
TRUNCATE `oc_attribute_description`;
TRUNCATE `oc_attribute_group`;
TRUNCATE `oc_attribute_group_description`;
TRUNCATE `oc_category`;
TRUNCATE `oc_category_description`;
TRUNCATE `oc_category_to_store`;
TRUNCATE `oc_customer`;
TRUNCATE `oc_customer_group`;
TRUNCATE `oc_customer_group_description`;
TRUNCATE `oc_customer_ip`;
TRUNCATE `oc_geo_zone`;
TRUNCATE `oc_information`;
TRUNCATE `oc_information_description`;
TRUNCATE `oc_information_to_store`;
TRUNCATE `oc_option`;
TRUNCATE `oc_option_description`;
TRUNCATE `oc_option_value`;
TRUNCATE `oc_option_value_description`;
TRUNCATE `oc_order`;
TRUNCATE `oc_order_history`;
TRUNCATE `oc_order_option`;
TRUNCATE `oc_order_product`;
TRUNCATE `oc_order_total`;
TRUNCATE `oc_product`;
TRUNCATE `oc_product_attribute`;
TRUNCATE `oc_product_description`;
TRUNCATE `oc_product_image`;
TRUNCATE `oc_product_option`;
TRUNCATE `oc_product_option_value`;
TRUNCATE `oc_product_reward`;
TRUNCATE `oc_product_special`;
TRUNCATE `oc_product_to_category`;
TRUNCATE `oc_product_to_store`;
TRUNCATE `oc_stock_status`;
TRUNCATE `oc_tax_class`;
TRUNCATE `oc_tax_rate`;
TRUNCATE `oc_tax_rate_to_customer_group`;
TRUNCATE `oc_url_alias`;
Using PHP on WAMP, import all of the data exported above into the OC_2 database
Move your image files from image/data to image/catalog (or download them from your shop into WAMP)
Using localhost on WAMP, you should now see your upgraded shop. There will be various issues, which for me were mainly in Admin/settings as I couldn't import these from 1.5.x, but in the main this just requires a bit of effort to replicate the settings. Just remember, if you want to run through the process a few times, back up the settings table in OC_2 so that you only need to make the changes once.
When you are happy, export the OC_2 database, create a new OC_2 database on the web site, install OC_2 on your live site, drop all the OC_2 tables and import the database from your PC, move the images from data to catalog, and everything should work as expected.
With the live site, I added 156 to the name of all the files and directories in the top level directory before I uploaded and ran the OC_2 install script, so I could revert to the previous version quickly. I also left the 1.5.x database on the web server.
Andrew
Andrew Hopps
[url]htttp://www.crystalsuncatchers.co.uk[/url]
[url]htttp://wholesalecrystalsuncatchers.co.uk[/url]
Who is online
Users browsing this forum: No registered users and 4 guests