Magento upgrade: the best practice to ensure a safe implementation

From time to time, the Magento CMS platform requires upgrading. For merchants using the Magento ecommerce platform, keeping your store updated and up to par with the latest version is of the utmost importance for ensuring your online business is safe from threats and operating efficiently.

In this guide, we explain the benefits of performing a Magento upgrade, as well as how to prepare and our expert recommendations for a successful implementation, with minimal impact to uptime and customer experience.

Why is it important to upgrade Magento to its latest version?

Like most software and digital systems, upgrades are essential for ensuring compatibility, security and continuity. Unsurprisingly then, a Magento upgrade will help keep your online store safe from the latest threats and security enhancements, compatible with the latest technological advancements and as a result, keep your ecommerce store running efficiently.
Some of the main reasons for updating you Magento ecommerce store are:

Security enhancements

Although the digital market has many benefits, online security threats are extremely prevalent. These threats can range from anything from data breaches and leaks to malware attacks. While platforms usually do everything they can to prevent such risks, over time, attackers can learn and build ways around the existing security systems in place.
Therefore, Magento upgrades often come with a range of updated security features and patches to help merchants stay ahead of attacks and vulnerabilities. Failure to keep up with the latest Magento version can leave your business at risk.

Improved performance

By keeping up with the latest Magento upgrades, you can ensure performance remains at the centre of your ecommerce experience. For instance, for businesses using third party plugins and modules that regularly release improvements and bug fixes, Magento upgrades help keep integrations connected without issues, such as vulnerabilities, technical compatibility and user experience.

Unlock new features and functionalities

One of the key drivers for online business is the ever-evolving technological capabilities and advancements. As one of the leading commerce CMS platforms, Magento is at the forefront of innovation and often releases updates that can allow merchants to take advantage of the latest ecommerce functions and features. Therefore, by keeping up to date with Magento updates, you can ensure your business is in the best possible position to leverage the latest features to enhance your customer experience, online offering and business efficiency.

Better mobile experience

Iphone and airpods

With mobile browsing behaviours only becoming more and more common across industries, merchants need to keep up. Offering your customers an excellent mobile experience is a non-negotiable, and generally, only possible when your ecommerce store is compatible and usable on a range of mobile devices – including operating systems, browsers and screen sizes, as well as carefully optimised for the mobile experience through SEO tactics . An up-to-date Magento store can help you achieve this.

End of support for older versions

Like most technologies, there comes a time when companies stop supporting old versions. Therefore, to ensure your business can still benefit from expert support, it is highly recommended to keep as up-to-date as possible with the latest version of Magento.

Currently, Adobe provides a three year support window. At the time of writing this article, this includes Adobe Commerce 2.4.4 and subsequent versions. Support is provided in the form of security fixes through security patch releases during the three year support window. For more information, please refer to the Adobe Commerce Lifecycle Policy.

Cost effective

Due to the process required for a Magneto upgrade, there will likely be some associated costs – from development support, testing and website downtime. Therefore, by updating your Magento version often, the resources and time required will equate to far less than an upgrade for a site that is many versions behind. The latter will be a much bigger and riskier project that will need careful planning and an investment of time and resources.

Due to the many benefits of performing regular Magento upgrades, we often help business plan and execute successful deployments. And here are our secrets to help you do the same…

Preparing for your Magento Upgrade

Preparation is key. Any successful website development project begins with a carefully prepared plan. In this planning phase, we recommend following these steps:

No two businesses are the same, so we’d always recommend taking into consideration any customisations and unique needs first. Contact our expert team of Magento developers for professional advice on planning and executing your Magento upgrade.

Verify the system requirements

php code

The first step in the process is to check the system requirements so you understand the update’s purpose and contents. Magento’s releases and system requirements are available here.

Magento uses a PHP framework. When there is a new PHP version, Magento needs to be upgraded to ensure compatibility.

Review the release notes

With any upgrade, there will be accompanying release notes to help you understand why and how to perform the update. Our advice would be to keep up-to-date with the release notes and Magento community forums for the upgrade for the latest additions and learnings. Unless it is an urgent security patch, it is usually best to wait until everything is settled and compatible before performing the upgrade.

Review the compatibility of custom extensions and themes

Before performing the upgrade, it is necessary to check whether there are any updates or compatibility issues with any third-party modules used by your online store, including payment gateways, stock management systems and international order processors, for example. You should also check that the website’s theme is compatible with the latest PHP and Magento versions.

Most paid modules will be supported by the latest Magento update and security patches. If there are any custom modules on your store, they will need to be checked individually, and the code may need to be updated in order to ensure they remain compatible.

Backup your data

Before making any changes to your Magento site for the upgrade, it is essential to take a backup of the database and the code, if available. This will be vital should you need to roll back the deployment if things do not go to plan or in case of any issues.

We advise keeping a zip file of the backup or setting up automatic backups from the server, which can be implemented by your server team.

Test the update on a staging environment first

The upgrade should be performed on a staging environment first, which should be a direct copy of your live Magento website. This way, you can test changes and troubleshoot any unpredicted issues, before deploying changes to the live website, where customers and the business can be directly impacted.

End to end testing should be performed, covering a range of scenarios and functions, from search and account creation to placing an order at checkout.

Review your upgrade plan checklist

Be sure to keep checking back through your upgrade planning notes and checklists to ensure everything has been considered. This will ensure a smoother go-live process, with minimal impact to your online business and customers.

Not sure what to include in your checklist? Keep reading! We share our tried and tested steps for successfully performing, testing and monitoring your Magento upgrade.

Review your code and scripts

If your Magento store is using any custom code or scripts, be sure to check that they are still present and working with the upgrade. They may need to be redeployed or re-configured to be compatible with the new changes.

Custom code or modules will need to be carefully checked, as they will not necessarily be compatible with the latest PHP version, like paid modules might be.

Plan for Downtime

Maintenance mode of website

Once you are confident that the upgrade is ready to be deployed, it’s time to begin the go-live preparation. The deployment will require some downtime for your website, so it is advised to schedule it for a time when your customers and business will be least impacted. Our recommendation is to check peak traffic or activity patterns and avoid these times. If your website serves international markets, be sure to consider when overseas customers tend to be most active too.

It is also advised to give those who will be impacted warning of the downtime beforehand, so they can make any necessary arrangements.

When the website is put into maintenance mode, it is also a good idea to display a message explaining the scheduled downtime, and that services will be back shortly. This will help reassure customers.

How to update Magento: a step by step check-list

Step 1: First enable the maintenance of the website.
php bin/magento maintenance:enable

Step 2: Install the Composer update plugin
composer require magento/composer-root-update-plugin ~2.0 –no-update

Step 3 -> Take a backup of the composer.json
cp composer.json composer.json.bak

Step 4 -> Update Magento version in composer.json file using below command. You can change the Magento version you require.
composer require-commerce magento/product-community-edition <Magento version> –no-update
Note: <Magento version> needs to be changed to your version, e.g. 2.4.6 or 2.4.7

Step 5 -> Update dependencies using the following command.
composer update

Step 6 -> Execute the following commands
rm -rf var/di var/generation
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento: setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush

Step 7 -> Disable the maintenance mode
php bin/magento maintenance:disable
Once the upgrade is complete, please be sure to check and confirm your Magento version by using the following command: php bin/magento –version

Post upgrade considerations and checks

Once you have performed the Magento upgrade, it is important to complete another thorough test of the website. Live ecommerce websites have a lot of moving parts that cannot always be replicated on a staging environment. Therefore, complete end-to-end testing after the upgrade is strongly recommended to ensure everything is working as it should be and that neither customers nor the business will be negatively impacted.

Test the functionalities of your website

There are several scenarios that should be considered when testing a website after a Magento upgrade. These include:

  • Customer and admin login portals and functions
  • Navigation, footer and mega menus
  • Placing orders, including:
    • Payment – ensure each payment method is tested
    • Order and payment processing
  • Product listing pages – check the frontend display and functionality, including:
    • filtering and sorting
    • Pagination
  • Sitewide search functionality
    • Autocomplete search predictions
    • Integration with a third party search plugin, if one is used
  • PDP (product detail page) – ensure vital functions in the customer journey are working, including:
    • Add to cart
    • Wishlist
    • Product configuration options, such as size selection
    • Bundle products – are prices and discounts accurately calculated?
  • Cart page – check cart-specific actions, such as:
    • Discount code application
    • Quantity update
    • Remove from bag
  • Checkout process, including:
    • Journeys for logged in and guest users
    • Address selection or autocomplete for logged in users
    • Order success page display and tracking
  • Returning customer journeys
    • For example, ensuring account holders can see history, wishlist, saved addresses, and whether these can be edited
  • External plugins and integrations
    • For example, communication with POS systems
  • Backend functionality, such as:
    • Creating and edit pages
    • Creating or updating products and categories
    • Creating, updating or editing discount codes
    • Managing orders – viewing orders, invoicing, shipment functions and processing refunds
    • Printing invoices
  • All scenarios should be tested with accepting and rejecting cookies

Troubleshooting

When testing, if any bugs or issues arise, it is important to identify and troubleshoot them promptly.

To do this, you can check the var/log folder for any errors and exceptions and action any fixes as necessary.

Performance monitoring

Pagespeed insights report

It is also important to monitor performance following the upgrade, as some issues might not be apparent right away. For example, uptime should be monitored to ensure there is no unexpected or additional downtime after the deployment.

Page speed is another key metric to check, as any lagging or slow load times could highlight an issue with the website. Tools such as GTMetrix, Google PageSpeed Insight or Lighthouse can help with checking and monitoring site speed. If levels are lower than normal, or below the benchmarks, there could be some troubleshooting to do.

A more obvious performance indicator is order levels. For instance, if you typically receive regular orders every hour, but this has slowed since the upgrade, there might be an issue in the customer journey, at checkout, or even the order processing.

Finally, reporting dashboards, such as GA4, can help identify any changes in traffic levels and user behavior. Irregular activity could be a sign of an issue with the Magento upgrade itself, or with the tracking set up. Both should be checked before any further changes are made.

Update on the live site

Depending on the severity and volume of the issues, you should aim to investigate and fix them on the staging environment first, and then schedule another deployment. This way, you can avoid prolonged downtime or the need for multiple deployments. Of course, if there are any critical issues that need to be addressed, these should be prioritised and solutions should be implemented promptly.

Maintenance

The best way to ensure a successful Magento upgrade is to maintain the health of your website. This may involve regularly updating plugins, keeping your database clean and performing upgrades often, to avoid being too far behind the latest Magento version.

Conclusion

So, now you know how to perform a smooth and successful Magento upgrade! By following these steps, you can minimise disruption to your customers and business, while maximizing the benefits of using the latest Magento features and functions. All it takes is careful planning and a thorough testing and deployment process.

Our expert team of Magento developers have extensive experience in performing effective upgrades, as well as custom development, migrations and maintenance. For more information on our Magento services, or to find out how we can help you, get in touch today on 0115 778 6950 or email info@autify.co.uk.

Moin Malek
Moin Malek
Lead Developer

Read More Blogs

Magento SEO guide

Magento SEO Guide for Best Practices

In the ever-changing world of SEO, it can be hard to keep up with the latest

Read More
Cart Abandonement

How to choose the payment gateway for your E-commerce

With multiple options available at various prices and benefits, choosing the

Read More
Contact

Get in Touch