This is a mini-guide on how to update Magento 2 theme.
Maintain a complete Magento backup, so that you can restore your store in case of any Magento critical issues. Follow this tutorial to perform a full backup of your Magento store: Magento 2. How to Backup Your Website.
[notice type=”warning”]Attention!!! You need to update your Magento engine to 2.2.3, 2.2.4, 2.2.5 or 2.2.6 version before upgrading the theme.
Theme Updating Without Data Saving
In case the new updates for your Magento theme is available (for more information, please contact the Support Team) and you know you do NOT want to keep any custom theme changes, you can start the theme updating to the latest version (2.2.2 >2.2.3, 2.2.4, 2.2.5).
When we say “without data saving” it means that any custom changes you’ve made to CSS styles ( app\design\frontend\Vendor\themeXXX\web\css folder) and images stored in the media folder (app\design\frontend\Zemez\themeXXX\web\images\media) will be removed.
[notice type=”warning”]This method of theme updating will not affect the products, categories and widget settings data.
To update the theme you need to connect to your server’s hostname, IP or domain and login with your hosting cPanel username and password.
Delete the theme and modules you want to update.
You need to delete the following folders:
- app\code\TemplateMonster\ (or\and app\code\Zemez ) – you’ll delete all TM Modules.
- app\design\frontend\Zemez\themeXXX\ – could be “TemplateMonster” instead of “Zemez”, remove the theme you going to update.
Go to your website root directory and upload archived app folder, you can find in the archive you’ve downloaded. Then exact it replacing your theme files.
The last step to run the command below via SSH:
If you perform changes on the hosting server, you can contact your hosting provider for help and use the hosting command line.
Theme Updating Without Data Loss
In case you want to save the changes you’ve made to the theme and modules files, the most reliable method to use is to copy the files with your custom changes from the previous theme version (2.2.2) and paste them back in the updated theme (2.2.3, 2.2.4, 2.2.5, 2.2.6) app folder.
You might need to copy the following folders:
- app\design\frontend\Vendor\themeXXX\web\css – custom CSS styles
- media (app\design\frontend\Zemez\themeXXX\web\images\media) – images for banners, sliders, About Us page
The procedure of theme updating is almost the same to the previous one.
You need to login your Magento store server and upload the app folder from the downloaded archive to your Magento store installation folder.
The only thing that’s different is that you need manually upload previously copied files with custom changes (or inset the part of code with changes in the source file of the updated theme) back to the updated theme app folder.
However, the mandatory step is to upload the app\design\frontend\Zemez\themeXXX\web\images\media with your theme images and app\design\frontend\Vendor\themeXXX\web\css folders from the non-updated theme to the updated theme.
XXX here is your theme number.
Remember, updating the theme will not affect you products, categories and widget settings data.
Then perform the commands in the command line, one by one :
Check the results.