Post by virtualshop34 » Fri Jan 04, 2019 6:57 pm

Hello all,
Can I upgrate directly from 2.1.0.2 to the lastest realease of opencart 3.0.2.0 without major problem ?
What is the best method to get the 3.0.2.0 on my website ?
Thanks for your help

Opencart version 2.1.0.2


New member

Posts

Joined
Wed Jan 18, 2012 1:19 am

Post by OSWorX » Sat Jan 05, 2019 11:16 pm

Whenever I update a shop for a client, i follow these steps:

1. create new shop with new version and new database in a subdirectory (if developed on clients server)
2. create new database
3. install the new shop completely
4. backup the old database (can be done before 1.)
5. compare old database with new structure
6. adjust new database tables comparing the fields from old (new fields not needed afterwards can be deleted when all is done)
6.a check the table entries
7. import the database backup (from step 4)
8 check shop and if all database tables are correct imported
9. install additional extensions (if wanted/needed)
10. install new theme (if wanted/needed)
11. check all again
12. set old shop into maintainance mode (because otherwise your database will have new entries [orders] you will not have in the the new shop)
13. backup the old database
14. import the old database into the enw shop
15. remove additonal fields in new database (see 6.)

A. if 11. is okay, either backup all files from old shop, delete all files from old shop and copy files from new shop into old directory
B. adjust the 2 config.php

OR

A. if 11. is okay, redirect the shop to the new disrectory via your server panel or .htaccess

This way may sound for much work, well need not more than 1-2 hours.
But not one headache after upgrading.

And the benedfit is, your liveshop is running while you deploy your new shop.
Because it may need a longer time as assumed ..

Summary
I. never touch a runnning shop!
II. always backup, backup and work with the backup

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Chris_UK » Fri Mar 22, 2019 9:35 am

I don't know how well this will go, especially if you have custom modules etc to take care of.

So this is how I would proceed with testing if you can jump to the latest version, its actually not all that difficult and all of the

Create a new subdomain (in a separate directory as in the previous post).
Create a new blank database
Create a new database user with appropriate permissions to use the new database.
Create a new ftp user for the sub domain

Backup Live website Database
"Backup" (all) Live website Files (everything inside the web path which could be public_html www web whatever yours may be). I say back up because all you really want is a copy, if this doesnt work you wont need it afterward.

Upload backup to subdomain using new ftp user
Upload Database (import sql) into new database

Open the browser and test your subdomain, if all is well you should just see your website as is would be on your live site, links will click to the old so don't worry about that.

open the two config files for catalog and admin (in backup files)
change the parts where your domain is listed to match the new subdomain
change the dbuser, pass and database to match your new settings from above.

save, upload backup code.

Test website, you should see no change, but now the links should work as expected and keep you in the subdomain rather than taking you to the live site.

Now, disable any and all extensions/modifcations (maybe you will need updated versions from oc marketplace, in fact I can almost guarantee it)
Now that you have the setup you of the way, here comes the really exciting part, get ready...





Upload the version of opencart that you want to your subdomain - follow documented update procedures.

Test your updated subdomain version of your website (FULLY), it will be vanilla if it worked but if it worked, well you're good to go.

Now you just make it changes to your live website.
Put your live site into maintenance mode to prevent users putting in orders/logging in and possibly seeing errors)
Take new backups of your live site (files and database as before, keep these somewhere safe and secure).
Disable all extensions/mods
Upload the upgrade to the live website
Follow update procedure

Re-enable modules/extensions, one at a time, I know its tedious but doing it this way you can test each one is working as expected and if not, either find an update or just remove it until you can modify it to work with the latest code version)

Test live site fully (it should be the same, but its always safer to test it out)

Once you are sure that its all working you can disable maintenance mode and your upgrade should be complete, customers may find bugs, the best thing you can do now (or before actually so customers don't get spooked by the sudden site change) is let your customers know that there may be bugs and how they should report them to you, might I suggest a new email account, non public used only for this so you know as soon as you see an email in that inbox you have a priority job to work on.

If you changes to the live upgrade does not go to plan then you have your nice safe and secure backups to revert all the changes.

REVERT:
Delete all files from the webroot of your live site
Delete the tables from your live database
Upload you backup files to your live site
Import your backup of your live Database
login to your admin panel and disable maintenance mode.
Your website is back as it was before any changes were made.

As long as you follow this to the letter, you should not have do anything that cannot be corrected or reverted to your website, but as i said, make sure your customers know before you do it. I would give 24 hours notice, just email with a time maintenance will start and let them know your website will be unavailable for say 2-4 hours to be on the cautious side. In all honesty this should take about an hour max depending on how comfortable you are with the tools you need to use.

New member

Posts

Joined
Wed Jan 20, 2016 4:39 am

Post by Kelvin.h.6354 » Tue May 28, 2019 10:10 am

I saw that the first two people answered very meticulously about how to update your OpenCart. However, I want to make it clearer on how to migrate your data from the old version of OpenCart to the newer one because this seems to be the most struggling but most important when you move your store to another place.

If I were you, I will use an automated shopping cart migration service to migrate my data. Why?
1. It's cheaper
Everything that was made to be automatic has cheaper price than that was made manually. Data migration is no exception. The cost to migrate your data from the old OpenCart version to the newer one is only from 59$, depending on the total number of entities you want to migration.

2. It's faster
If you migrate things manually, it may take you at least 1 week. However, when you go with the migration tool, it only takes you a few hours. Your precious time is now saved for more important missions.

3. You have a whole support team who are specialized in shopping cart migration by your side whenever something goes off the track.

4. It's much easier
Well, using an automated tool to migrate your data is super easy, you can get your job done with only 3 steps.
1. Input your Source and Target cart information (something like your store's URL)
2. Select entities you want to migrate
3. Wait for the migration to finish

Newbie

Posts

Joined
Wed May 22, 2019 5:34 pm

Post by Chris_UK » Sun Aug 18, 2019 5:46 pm

Without wanting to start an argument here, I have to disagree. The number one golden rule whenever working with your database/website is "Always make a backup".

Yes you can save yourself a few minutes by not doing so, and automating will save you a bundle of time too. But nothing comes without risk, even automated upgrades. The program might perform flawlessly without exception, but can you guarantee that there will be no external influence causing problems mid upgrade? Power outage at the Data centre? Server Failure? any number of other factors that might cause an upgrade to fail and leave you with a store that no longer works and the loss of possibly years of products/orders.

I can tell you from personal experience that failing to make a backup WILL bite you one day. I perform nightly backups and still managed to lose 3 months of data earlier this year because I decided to upgrade the servers operating system without checking that all of my backups were present and correct. What i did not know was the backups had been failing. When the OS upgrade failed midway it left me with a system that was unrecoverable and none of my backups were there to fall back on.

Yes in hindsight I should have been checking error logs and making sure everything was running smoothly, but hindsight is not able to help me with the data loss that occurred. The only saving grace for me is that work I did 3 months before the failed OS upgrade gave me cause to take an entire backup. Without that 3 month old backup I would undoubtedly have lost everything that day and probably been out of business entirely.

In summary to all that reasoning, the cost of recovery/losses in sales will far exceed any cost you might reasonably expect to pay to buy a module or the cost of your own time if manually upgrading. For myself a conversation with the tax man when my tax is due might result in an audit. No problem you might think, its explainable. But still do you need that kind of stress in your life when you are just trying to run a business and made a mistake.

Please, please ALWAYS make a backup.

New member

Posts

Joined
Wed Jan 20, 2016 4:39 am

Post by Chris_UK » Sat Aug 24, 2019 3:52 pm

In an ideal world yes that would be it. All extensions would be compatible or have a version compatible with any given OC version.

Sadly, that isn't the case extensions often get built for a version for a specific use and never see an update to a current OC version. If you are using such an extension you would not find it easy to upgrade, unless you were able to make the code changes yourself you, get a developer to do it or simply lose that extension. It really depends on how important an extension is to your website I suppose.

New member

Posts

Joined
Wed Jan 20, 2016 4:39 am

Post by sfbh » Mon Apr 13, 2020 11:46 pm

OSWorX wrote:
Sat Jan 05, 2019 11:16 pm
5. compare old database with new structure
6. adjust new database tables comparing the fields from old (new fields not needed afterwards can be deleted when all is done)
6.a check the table entries
Can you provide some details about how to complete these steps?

Newbie

Posts

Joined
Sun Apr 16, 2017 4:51 am

Post by straightlight » Tue Apr 14, 2020 12:00 am

sfbh wrote:
Mon Apr 13, 2020 11:46 pm
OSWorX wrote:
Sat Jan 05, 2019 11:16 pm
5. compare old database with new structure
6. adjust new database tables comparing the fields from old (new fields not needed afterwards can be deleted when all is done)
6.a check the table entries
Can you provide some details about how to complete these steps?
If you do not know how to accomplish this, that's no problem. You could always create a new service request in the Commercial Support section of the forum or contact me directly to get this done as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by OSWorX » Tue Apr 14, 2020 12:43 am

sfbh wrote:
Mon Apr 13, 2020 11:46 pm
OSWorX wrote:
Sat Jan 05, 2019 11:16 pm
5. compare old database with new structure
6. adjust new database tables comparing the fields from old (new fields not needed afterwards can be deleted when all is done)
6.a check the table entries
Can you provide some details about how to complete these steps?
Well, I would say, I was very clear with my instructions ..
What can you not understand?
Comparing? Adjusting? Checking?

And as straightlight already mentioned: either contact the developer you trust (very important !!), or post a new request in the Commercial Section of this Forum: viewforum.php?f=88

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 52 guests