Magento, especially Magento 2, has long since been a synonym of robustness and extreme customizability. It is also frequently referred to as one of the enterprise’s strongest platforms. Having been around for quite a while, it has evolved to have one of the world’s largest fan and developer groups. As well as this, according to Builtwith, Magento is ranked 3rd most popular in the top 10.000 sites in the Open Source category.
Generally, when you run an eCommerce store, it is always vital to upgrade your store to a more developed version to remain on top of the competition. Growing within each and every year, Magento 2 never stops to offer more and more robust versions, giving impetus for store owners to elevate their current Magento 2 store to another upgraded level. However, I bet some of you guys here are still skeptical about the most optimal way to conduct Magento 2 Upgrade.
Therefore, in this article, I will shed some light on two methods to conduct Magento 2 upgrade from 2.x to 2.y . In particular, this article will step-by-step detail the process of each method then compare one over another. We will, together, find out the best method for Magento 2 upgrade at the end of this article. Come along with us to see!
Methods for Magento 2 Upgrade
When it comes to Magento 2 Upgrade, store owners usually have two options to choose:
- Upgrade via Magento System Upgrade: Run system upgrade or upgrade with command-line
- Using automated Magento 2 Upgrade Service.
Then now let’s see what they are and how differently they are performed.
How to perform Magento 2 Upgrade via Magento System Upgrade
IMPORTANT: Before performing Magento 2 Upgrade via Magento System Upgrade, make sure you are TRULY confident with your technical and Magento knowledge, fixing code, PHP skills,… The reason is this process requires you to dive deep into Magento database structure. Therefore a lot of hard-to-fix errors may happen and they are related to inappropriate PHP setup, backup failure, file permissions,…etc.
Therefore, if you find yourself incapable of dealing with all these hardships on your own, straightforwardly skip to the automated Magento 2 upgrade solution with which you can perform the process seamlessly, without technical knowledge.
Anyway, let’s get started with the system upgrade!
A/ Run System Upgrade
System Upgrade prerequisites
Before starting, to avoid errors during your process, make sure you verify all below tasks:
- To set up a Magento file system owner and shared that owner’s group with the web server user group
- Your cron jobs are set up and running
- Set a value for DATA_CONVERTER_BATCH_SIZE
- File system permissions are set properly
After verifying the necessary tasks above, you need to complete all tasks discussed below:
1. Select versions to upgrade
1.1. Choose which components to upgrade:
After you start System Upgrade, you’ll see the following page.
Then you have the following options in this page:
|Try Again, Next||Then hit Try Again to look for upgrades.|
|Magento Core Components list||Shows available core component versions for upgrade.|
|Other Components button||Allows you to look for upgrades for third-party components.|
● To specify the number of items to display on a page.
● From left to right, move back one page, go to a specific page, or move forward one page.
|List of components||With each component:
● Set Upgrade to Yes to upgrade it.
● Set Upgrade to No to skip it
1.2. Upgrade components
Click the core component version at Magento Core Components list to upgrade:
For each third-party component:
- If you want to upgrade, set Upgrade to Yes and choose the desired the version from the list.
- If you don’t want to upgrade it, set Upgrade to No
Step 2: Start readiness check
Click either Start Readiness Check or Next to proceed.
A successful readiness check message has been reported.
Error 1: Updater application is not available
Cause: This is due to an unavailable updater application
Solution: To resolve this issue, see if there is a
<magento_root>/update directory that contains files and subdirectories.
Error 2: Conflicting component dependencies
Cause: This message shows up if Composer cannot determine which components to install or update.
You are trying to update package(s) magento/module-sample-data to 1.0.0-beta We’ve detected conflicts with the following packages: – magento/sample-data version 0.74.0-beta15. Please try to update it to one of the following package versions: 0.74.0-beta16, 0.74.0-beta14, 0.74.0-beta13, 0.74.0-beta12, 0.74.0-beta11, 0.74.0-beta10, 0.74.0-beta9, 0.74.0-beta8, 0.74.0-beta7
Solution: Typically, component dependency conflicts arise when one manually edits the Magento 2
composer.json file. The error can also comes from the third-party modules that depend on earlier Magento components than the ones you have installed.
In the above example, the installed package
magento/sample-data version 0.74.0-beta15 cannot be upgraded to
1.0.0-beta. However, 0.74.0-beta15 can be upgraded to
0.74.0-beta16 (or others).
composer.json to make any of these changes and try the readiness check again.
Error 3: PHP version readiness check issues
- Unsupported PHP version
Cause: The check fails because you are using an unsupported PHP version.
- PHP readiness check does not display
Cause: This happens due to incorrect cron job setup. The PHP readiness check doesn’t display the PHP version as the following figure shows.
Solution: This is a sign of incorrect cron job setup. For more information, see Set up cron jobs.
- Incorrect PHP version
Cause: Usually, this happens only to advanced users who have multiple PHP versions installed.
If the PHP version reported by the readiness check is incorrect, it’s the result of a mismatch of PHP versions between the PHP CLI and the web server plug-in.
To solve the issue, try the following:
- Restart your web server or php-fm.
- Check the
$PATHenvironment variable for multiple paths to PHP.
- Use the
which phpcommand to locate the first PHP executable in your path; if it’s not correct, remove it or create a symlink to the correct PHP version.
- Use a
phpinfo.phppage to collect more information.
- Make sure you’re running a supported PHP version according to the system requirements:
- Then set the same PHP settings for both the PHP command line and the PHP web server plug-in as discussed in PHP configuration options.
Step 3: Back up the file system and database
Follow these steps to back up:
3.1. Choose the checkbox of each item to back up and click Create Backup.
3.2. Wait until backups are done and continue with any of the following:
Error 1: Backup disabled
Backup functionality is disabled.
Backup functionality is currently disabled. Please use other means for backups.
Cause: If the Magento backup functionality does not start or displays the following message, you need to enable the feature prior to backing up.
Solution: Run the following CLI command:
bin/magento config:set system/backup/functionality_enabled 1
Error 2: Insufficient disk space
If the backup failed because of insufficient disk space, you should typically free up disk space by moving some files to another storage device or drive.
Error 3: Backup fails
If the backup fails or if all backup tests fail, it’s possible the Magento file system owner doesn’t have sufficient privileges and ownership of the Magento file system. For example, another user might own the files or the files might be read-only.
Solution: Pay particular attention to file system permissions and ownership of the
<magento_root>/var directory and subdirectories.
Step 4: Upgrade
To complete the upgrade, click Upgrade. If the upgrade is successful, a page similar to the following displays.
4.1. Clean the Magento cache
Run the command line:
4.2. Manually clear directories
Once the upgrade is completed, manually clear var subdirectories by running the commands below:
If you have varnish installed, after the upgrade completes, restart Varnish if you use it for page caching.
4.3. Restart Varnish
service varnish restart
Then access your storefront and verify if everything is working properly.
After you finish your upgrade, errors might display:
Error 1: On the main storefront page, the following error might display:
We’re sorry, an error has occurred while generating this email.
Cause: This is due to permission issue.
- Reset file system ownership and permissions as a user with root privileges.
- Clear the following directories and try again:
B/ Upgrade via Command-line
Step 1: Turn on maintenance mode
To block any access during the process, it’s indispensable to turn on maintenance mode for your site.
Here’s how to do it:
- Log in to your Magento server as, or switch to, the Magento file system owner.
- Enter the following command:
php <your Magento install dir>/bin/magento maintenance:enable
Step 2: Change to the directory in which you installed the Magento software.
For example: cd /var/www/html/magento2
Step 3: Run these following commands
composer require <product> <version> --no-update composer update
For example, to upgrade to Magento Open Source version 2.0.14, enter:
composer require magento/product-community-edition 2.0.14 --no-update composer update
Step 4: Enter your authentication keys.
Step 5: Manually clear var subdirectories
Run the following command lines
Step 6: Update the database schema and data
Run the following command line:
php bin/magento setup:upgrade
Step 7: Put your storefront online (it means to disable the maintenance mode)
Run the following command line:
php bin/magento maintenance:disable
Step 8: Restart Varnish if you use it for page caching.
Run the following command line:
service varnish restart
Step 9: Access your storefront.
The following error might display: “We’re sorry, an error has occurred while generating this email”.
Please perform the following tasks:
- Reset file system ownership and permissions as a user with root privileges.
- Clear the following directories and try running these folowwing command lines again:
After the upgrade, again check your Magento version with the following command:
php bin/magento —version
Error 1: There are no commands defined in the “setup” namespace on windows.
setup_version in your module.xml file. Your module.xml file should be like this:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Vendor_Module" setup_version="1.0.0"/> </config>
You need to give full permission to both var and pub folders.
sudo chmod -R 777 var pub
Error 2: php bin/magento setup:upgrade not working
This is due to the permission issue.
Give permission and try again.
chmod u+x bin/magento
sudo chmod -R 0777 bin/magento
Error 3: Can’t create directory var/generation/Magento/
This is a permission problem, Magento is unable to write to your var directory. Follow the official documentation to setup your permissions properly.
What’s to conclude about Magento 2 System Upgrade Method?
This solution is made for DIYers, therefore, you’ll have no official support from Magento. In hours of need, there are still some decent Magento communities to reach out for help to solve arduous tech stuff and complex errors. However, you can’t always get help instantly because users are not always available there for you, not to mention the solution’s efficiency is probably unverified.
For non tech people this seems a bit complex, so is there any easier solution to get this accomplished?
How To Perform Magento 2 Upgrade With Automated Shopping Cart Migration Tool
Automated shopping cart migration service is believed to be the most advanced method today. It helps transfer product, customer, order, other data and information from one shopping cart to another automatically, accurately and securely.
Among several data migration services in the market, LitExtension is ranked number one. When it comes to migration from Magento 2.x to Magento 2.y, not only can we migrate products, orders, customers but also multistore, CMS pages and so on. Especially, LitExtension provides additional options that allow you to expand the migration possibility, such as customer password, SEO URLs migration,…
Then you should try the full information about what we can do, please see in our Magento 2 Upgrade service.
With 98% of user satisfaction according to FinancesOnline and trust score of 4.8 out 5 on TrustPilot, LitExtension can confidently say that we are the most trustworthy and quality-proven shopping cart migration expert in the field. Having worked so hard for many years, we’ve been so blessed to have such huge love and positive feedback from our customers. Also, you might want to see feedback on our service at “What Customers Say About Us”!
Now, don’t wait any longer, let’s move on to how to perform Magento 2 Upgrade with LitExtension.
Detailed Steps And Frequently-Faced Errors
Step 1: Set up your Source and Target store
1.1. Access LitExtension and register/log in
1.2. Enter Magento Source Store Information
On the Migration Page, click Create New Migration at the top right button on the screen. Then choose Magento as your source cart and fill in its URL in the corresponding field. After that, click LitExtension Connector to download the connector. This connector will set up a connection to your old store. Unzip it and upload to Magento 2’s root folder.
Right here, the Connector Installation will be automatically checked and informed on the screen without manual checking.
1.3. Enter Magento Target Store Information
After that, repeat the same setting procedure of the target store. Download LitExtension Connector, extract the zip file and upload the connector to Target Store’s root folder.
At this step, you may encounter some connector setup issues regarding permission but that’s alright, we’ve summed them up and provided solutions alongside. Beside, a helpful support team already awaits there for your needs. See how the problems are resolved here!
Step 2: Select Entities You Want To Migrate
You can either choose all your data or only choose the necessary ones.
Neverthelless, if desired, at this stage, you can select additional options that will help to extend the data import functionality. LitExtension has developed the features to help you solve important problems following migration. For instance, to minimize the SEO effect after switching, you can create 301 redirects to your target store.
In addition, you are able to map order statuses and customer groups in this phase. Choose necessary descriptions and every data to migrate respectively.
Step 3: Perform Data Migration from Magento to Magento
- To Try Demo: Start your demo migration with a limited number of entities. You will see the same actions as the actual migration. However you can skip this step by clicking the “Skip Demo Migration” button to immediately move forward to Full Migration.
- To Perform Full Migration: Please click the “Skip Demo Migration” button to perform full migration immediately. Our tool will display a report showing the number of entities you have selected to migrate after demo migration.
Step 4: Post-Migration Checkup
Then, you will receive an email after complete migration. Simply head to your Target Store to check the result.
In order for the data to show on the frontend, you need to run command line (login with SSH) to resize images, reindex and clear cache as follows:
Note: Out-of-stock products are disabled on Magento store by default. This means they will not be shown on the frontend and not visible to your customers.
Therefore to display these products, you need to follow these steps:
- Go to System > Configuration > Catalog > Inventory > Stock options > Choose “Yes” in Display Out of Stock Products and click “Save config”
Step 5: Migrate incremental and updated data
Your data transfer with LitExtension has just completed and you’re going to set up the new store for some time. Then you’ll be dealing with design customization, discovering the new admin panel or digging into new SEO features. In the meantime, your old store still stays active and keeps receiving new entities or you can make updates on your old store. Therefore, it’s certainly important to transfer all the new entities and updates to the target store in order to keep it up-to-date.
LitExtension offers you 3 options that can address this concern:
- Recent Data Migration: This function enables you to automatically transfer all the data that appear in your source store after the complete platform switch.
- Re-Migration: This option helps you to transfer everything all over again therefore this includes data that has been transferred before, data that recently appeared in your source store and data that has been updated.
- Smart Update: It updates data which has been modified and transfers data that recently appear in your Source store after the migration. This option can solve the problem better and quicker than a re-migration.
As well as this, these 3 options are free and you can use them for unlimited times under these conditions:
- You have performed full migration with LitExtension within 3 months before.
- The total additional entities is less than 10% the total number of entities in initial migration.
The Final Verdict
Let’s have a quick recap of which Magento 2 Upgrade method is better through our comparison.
|Magento System Upgrade||LitExtension||Winner|
|Ease of Use||Must have a high level of technical knowledge in Magento database structure, fixing code, PHP skills,…||The tool is user-friendly and step-by-step wizard instructions are well-constructed.||LitExtension|
|Cost||Cost nothing but a lot of time for DIYers. If store owners hire other 3rd parties to perform the task, the cost fluctuates at $50-$80/hour. The total price for the whole process usually ranges from $500-$2500. However, if you face with unpredictable results and the data are corrupted because of some 3rd party module/app, the transfer is restarted → Higher cost||Depends solely on the number of entities you are planning to transfer.Price starts from $59. You can estimate the price and time you need for your migration with LitExtension pricing tool. Migration with LitExtension can save your budget up to 88% in comparison with migration with freelancer/dev agency.||LitExtension|
|Transfer-Related Risk||The quality and accuracy of data transfer may be irrelevant and might cause data loss or duplication.||LitExtension prioritizes data accuracy and has a set of practices and technologies in place to ensure the highest level of data accuracy. So we can guarantee 0% data loss during your migration.||LitExtension|
|Support Over The Process||DIYers shall have no support, but if you hire 3rd party, then support is available.||In case of any questions or special requests, there is a highly qualified and accessible support team that is always ready for you 24/7 via ticket, phone, live chat, or email.||LitExtension|
|Process Tracking||You can’t keep track of what’s happening with your data, as well as can’t have control over the process.||Migration process is performed by the LitExtension tool; however, you can monitor every step through the migration interface. There are buttons to stop and continue the migration at any time. In addition, our tool automatically runs in the background amid the internet or browser connection. You can even turn off your PC, have a cup of coffee and we will send you an email once the process is complete.||LitExtension|
|Demo Migration||You can’t preview the process, which may make you feel uncertain about the result.||On the other hand, LitExtension gives you the opportunity to preview the service before kicking off the full migration. You can transfer limited entities with our free demo and see the effectiveness and accuracy of the process yourself.||LitExtension|
Compared to Magento Upgrade System, an automated shopping cart migration tool like LitExtension can easily surpass with a number of superior features. In short, some notable advantages worth being mentioned here are:
- No programming or software skills needed
- Top-notch data migration quality
- Widest array of transferable entities
- 100% current store uptime
- FREE Demo migration
- 24/7 tech support and assistance
- Flexible pricing strategy
- Absolute data security
The decision to level up your store to an upgrade version of Magento is very critical therefore requires time and effort for figuring out the most optimal way for it. Although the process itself is not an easy task, but with an appropriate plan and an appropriate method , you can upgrade your Magento store on time, on budget, effectively.
In conclusion, LitExtension, with its powerful automated migration tool that supports smooth transition, has been the best pick for almost every business that wants to upgrade their Magento 2 store.
So, are you ready to elevate your Magento store to a better level? Then, you should try migration from Magento 2.x to Magento 2.y with LitExtension now. Our team will save your time, money, and free you from the hassle of dealing with it all on your own.