Magento 2.2 EE Features – How to improve for Magento 2.2 CE Features more powerful. Magento 2.2 brings the huge changes for Ecommerce Store. As you know, Magento 2.2 is released specially for B2B. This B2B is only available in Enterprise Edition. Magento 2.2 CE features are less than those of Magento 2.2 EE. The best CMS Extension for Magento 2.x Create lots of different content types such as Blogs, Landing Pages, Home page, FAQ, Documentation, Press releases, Testimonials, Stores Locator, Team Presentation, Lookbooks, etc. In just few clicks. Add as many custom fields as you want: text, text areas, files, images, selection menus, and relation with products, attributes and other contents. This patch provides a fix for problems that merchants experienced when trying to change a storefront’s applied theme in Magento 2.2.4 or 2.2.5. See GitHub-14968 for more information. Merchants who are running Magento 2.2.4 should upgrade to 2.2.5.
Today I will describe how you can perform a Magento 2 upgrade.
When you run an eCommerce store it is vital to stay secure and up to date. You should always look out for the latest M2 version and update promptly.
A word of advice: always backup your files and database before attempting an upgrade. With a platform as complex as Magento 2 you can’t anticipate what is going to happen next. A lot of things might go wrong. You better have a way to go back.
3 Ways to Upgrade Magento 2 Installation
- Magento composer update. That is using Composer, a terminal command line program.
- Upgrade Magento from admin using the Web Setup Wizard.
- Copy the Magento 2 latest version over the old installation.
1. Using Composer
Composer is a dependency manager for PHP. It can help you update your store with minimum hassle.
Instructions to get Composer installed might depend on your server operating system. I will use Debian Linux as an example. Run this SSH command:
It will install Composer systemwide for every user to run. You can always ask your system administrator for assistance.
Now for the upgrade itself you will need to use SSH (Secure Shell). Ask your hosting company for credentials. Login to your server and go to the Magento root folder (usually it is ~/public_html):
Then remove everything in the vendor folder:
Now you can open composer.json file and replace your current version with the latest version sequence (say 2.2.0):
Magento 2.2 5 Demo Download
When that is done go to SSH and update Magento 2 with Composer:
It will ask you for credentials.You may obtain those at Magento marketplace, here is the link https://marketplace.magento.com/customer/accessKeys/:
One thing to remember: username is a public key and password is a private key. That is one of the ways Magento might confuse you.
Once you enter credentials, Composer will go ahead and install the latest Magento 2 version:
UPDATE: If you don't want to edit any files you can run the following command to update to the latest Magento release (2.2.5 at the moment):
If you are running Magento 2 commerce the command will be slightly different:
Replace 2.2.5 with the latest M2 version.
When it is completed, run another SSH command and upgrade the Magento database:
After that you will want to recompile if you are in production mode:
This is it. You’ve successfully performed a Magento 2 upgrade! Now go to the frontend and backend and check everything.
NB: Composer might complain about some PHP extensions not being downloaded. You might want to install them in order to proceed.
2. Using the Web Setup Wizard in the Admin Menu
Magento 2 has a menu option under System > Tools called Web Setup Wizard. You can use it to install extensions bought via the Magento Marketplace. You can also use it to upgrade Magento.
NB: There might not be such a link in your installation. That is a bug which is not fixed as of Magento 2.1.8. Other times the link might disappear after your migrated from Magento 1.
The simple workaround is:
- Login to Magento backend.
- Go to http://shop.com/admin_xxx/admin/backendapp/redirect/app/setup/. http://shop.com/admin_xxx is path your backend.
- You will be automatically redirected to http://shop.com/setup/#/home. There you will select System Upgrade.
Click on System Upgrade and follow instructions. They are self-explanatory.
If Show All Versions is checked you can upgrade to unstable development releases.
Magento 2.2 5 Demo Tutorial
At Step 2. Readiness Check you might need to upgrade your PHP. Or install plugins. Do as suggested:
I suggest you backup your files and database manually. Skip Create Backup step. It might hang and you will need to start over.
3. Download the latest version manually and copy/paste
Upgrade this way if the previous two failed for whatever reason.
Download the latest Magento 2 off the official website. Unzip it in your magento main folder. That will overwrite the core files with the new ones.
Then run:
...and
That will upgrade database, compile and deploy static content. It might require some time depending on the number of products, orders and customers you have.
Upgrade is done. Head to frontend and backend and see if everything looks normal.
Should I update my theme after an upgrade?
If it’s a custom-made theme you should definitely contact its developers and ask them to audit it. Tell them you just upgraded M2 and you are not sure if the theme will play well with the current Magento version.
If you purchased a premade theme the vendor usually releases patches for every new M2 version that comes out. Go to templatemonster.com or the site you bought your theme from and see if there are updates available for download.
It is important that you check your Magento frontend pages for any misaligned or missing content. A Magento 2 upgrade can cause serious damage to the look of your website.
Magento 2.2 5 Demo Pc
What if things go the wrong way?
As with everything in Magento, an upgrade is easier said than done. Below I put together the various errors (and suggested fixes) that might happen during the Magento 2 upgrade process.
1. Component dependency conflict
This problem happens when you try and upgrade Magento via Setup Wizard. At the Readiness Check step it might throw out an exception like this:
There is no real explanation of the issue and you might wonder how to fix it. From my experience dependency conflict in most cases is caused by a third-party extension depending on some old Magento 2 component.
You can resolve the issue by doing the following:
- Uninstall all custom extensions.
- Perform an update to the latest Magento version.
- Reinstall the custom extensions.
In some cases the conflict is caused by a changed composer.json file. Try and restore composer.json to the original version and run Setup Wizard one more time.
2. Can’t create directory
This error happens when you run php bin/magento setup:upgrade right after an upgrade. The complete issue description might look like this:
What should you do in this case? The fix is very simple:
- Delete var/di folder.
- Change permissions of var and pub folder to 777 (chmod -R 777 var pub).
- Run php bin/magento setup:upgrade.
Run php bin/magento setup:di:compile.
3. Cannot allocate memory error
If you encounter this error during an upgrade it means there is not enough RAM allocated to PHP processes. Contact your system administrator and ask him/her to increase memory limit to at least 2 Gs.
Of course that means you cannot safely run Magento 2 on a server with less than 2G of available RAM. You should upgrade your plan to meet the minimal hardware requirements.
4. There are no commands defined in the 'setup' namespace
This is a generic message that might not be helpful.
There are various ways to try to fix the error:
1. Give full permission to var and pub folders:
2. Inspect your custom modules, make sure every extension's module.xml has setup_version in it:
3. Inspect your composer.json file. Sometimes an error there might cause a Magento 2 upgrade command to throw the'no commands defined' exception.
5. php bin/magento setup:upgrade not working
From my experience this is mostly related to some custom module having a problem. Try to inspect every one of them to see if you could spot an error.
Try to delete every custom module, update your instance and install them back.
Sometimes clearing generated (the latest 2.2.x versions) or var/di, var/generation (in case of an older Magento 2.1 upgrade) folders helps.
Bonus: Can I downgrade Magento 2 the same way I upgrade?
Yes you can!
You should follow step 1 and downgrade with Composer. Just put the version number you would like to have and repeat everything else.
I have tried this method and successfully downgraded 2.1.8 to 2.1.6.
I don't think you can use the Web Setup Wizard, but I am sure you can follow step 3 to downgrade M2.
I hope now you have learned how to upgrade Magento 2 to the latest version. At least I hope I managed to explain it well in this article. If you have any questions you are more than welcome to ask them at the bottom of this page.
Do you know Magento 2 can be slow? And slow checkout leads to sloppy conversion rates.
Check these 34 ways to improve Magento 2 & 1 performance.
Contact an expert to make your Magento faster.
Do you need a Magento 2 update? Contact me today for a free quote!
If you find this post interesting do not hesitate to sign up for our newsletter and join the 957 people who receive Magento news, tips and tricks regularly.
Thank You!
Demo the Best eCommerce Platform
See for yourself why thousands of merchants trust Magento to bring their eCommerce vision to life.
About the Webinar
We’re excited to announce that Magento 2.2 is entering its final stages of development and the code will be released soon. Magento 2.2 brings significant new functionality to market, including a full suite of native B2B features, performance and deployment enhancements, advanced reporting and more.
Watch this developer-focused webinar to help you prepare for the release:
- Magento 2.2 features
- Platform updates
- Release timeline
- How to participate in 2.2 testing
- Open Q&A
About the Webinar
Magento 2.2 5 Demo Euro Truck Simulator 2
We’re excited to announce that Magento 2.2 is entering its final stages of development and the code will be released soon. Magento 2.2 brings significant new functionality to market, including a full suite of native B2B features, performance and deployment enhancements, advanced reporting and more.
Watch this developer-focused webinar to help you prepare for the release:
- Magento 2.2 features
- Platform updates
- Release timeline
- How to participate in 2.2 testing
- Open Q&A