How to Update Magento 2: The Complete Guide

If you’re looking to enhance your customer experience, improve site stability, or simply meet ever-evolving industry standards, upgrading to the latest Magento version is a crucial step.

With this in mind, Envisage Digital’s Magento development experts are here to take you through everything you need to know about updating Magento 2 to the latest version. From preparing your site for the update to a detailed step-by-step process, we’ll give you all the information you need to know.

Ready to future-proof your Magento store? Let’s explore how to update Magento 2!

What Do You Want To Know?

  1. What Do You Need to Update Magento?
  2. How to Update Magento: Step-by-step
  3. Upgrade Magento Smoothly with Envisage Digital
Depositphotos 78113092 Xl 1 1 | Envisage Digital

What Do You Need to Update Magento?

Before you begin the process of updating Magento 2, there are a few prerequisites that you need to have in place to ensure the update runs smoothly. Proper preparation is key to avoiding errors and minimising downtime for your store.

Here are some of the key requirements that you’ll need to update Magento:

Server Access and Credentials

Ensure you have SSH access to your server with administrative privileges, as well as your Magento Marketplace account credentials to authenticate and download required updates.

Backup and Development Environment

Create a complete backup of your site, including files, database, and configurations. It’s also recommended to test updates in a staging or development environment first to avoid disrupting your live store.

Composer and System Readiness

Magento updates are managed through Composer, so ensure it’s installed and updated on your server. Additionally, verify your server meets the latest Magento version's system requirements, including PHP version compatibility, memory limits, and necessary extensions.

Stable Internet Connection and Technical Knowledge

A reliable internet connection is crucial for downloading update packages, while basic knowledge of SSH commands, Composer, and Magento’s structure will help streamline the process.

Expert Support

If you’re unsure about handling updates yourself, partnering with a Magento expert like Envisage Digital can make the process a lot easier for you and your store.

So now you know what you’ll need to carry out the update, let’s explore how to follow it through, step-by-step.

Depositphotos 114571430 L 1 | Envisage Digital

How to Update Magento: Step-by-step

1. Download the production database

The first thing you’ll want to do when updating Magento is to download a production database. Doing this will ensure you have a working backup of all your data, including customer information, orders, and configurations.

Use this database to set up a development or staging environment where you can safely perform the update without affecting your live site.

2. Install the master branch

Secondly, clone your Magento repository and switch to the master branch in your version control system. This means you’ll be working with the latest stable codebase, which is essential for a smooth update.

3. Update magento

Use Composer to update the Magento core. Run the necessary commands to fetch the latest Magento version and apply the update. Be sure to follow Magento’s official instructions to avoid compatibility issues.

4. Update third party dependencies

Check for updates to third-party extensions and libraries to ensure compatibility with the new Magento version. This step is crucial for preventing conflicts or errors caused by outdated code.

5. Audit composer patches and replace block, fix issues if needed

Review any custom Composer patches you’ve applied to your site. Make sure they are compatible with the updated version of Magento. If a patch is no longer needed or causes issues, replace or remove the affected code blocks and test thoroughly.

6. Update modules in app/code

For custom modules in the app/code directory, verify if updates are required based on the changes in the new Magento version.

It’s important to note that not every update will require module changes. For example, minor version updates (e.g., p9 > p10) may not affect them. However, it’s important to test modules thoroughly after the update.

Updating modules means you’ll set a solid foundation for a successful Magento 2 update. But remember, you should carry out this process methodically and address any issues as they arise.

7. Test Magento compilation

Run Magento’s dependency injection compilation command using setup:di:compile. This ensures all generated files, like factories and proxies, are up to date and ready for use in the new version.

Any issues encountered during this step may point to problems with custom modules or third-party extensions that need resolution.

8. Test major pages (catalog, cms, blog if present)

At this stage of your Magento update, it’s important to thoroughly test your site’s key pages. such as product listings, product detail pages, the homepage, and any CMS or blog pages. When doing this, verify that the layout, functionality, and navigation work as expected.

This step helps identify and address any update-related issues that could impact the user experience.

9. Test checkout / payment methods

If there’s one element of your site you don’t want to fail, it’s the checkout and payment methods. After all, this will be the way that your business generates revenue.

If there’s one element of your site you don’t want to fail, it’s the checkout and payment methods. After all, this will be the way that your business generates revenue.

So, you’ll need to test this works by simulating the checkout process. Ensure all steps of the buying process, from adding items to the cart to completing a transaction, are functioning correctly.

Additionally, confirm that all payment methods are operational and integrate seamlessly with the updated Magento version.

10. Check for and fix any console errors

Inspect the browser’s developer console for JavaScript errors on both frontend and admin pages. Fixing these errors is crucial, as they can disrupt site functionality or prevent users from completing actions.

11. Check for and fix any CSP errors

Content Security Policy (CSP) errors can arise if scripts, styles, or resources are blocked due to stricter security policies in the updated version. Use Magento’s CSP whitelist module to address these issues and ensure all necessary resources are loaded properly.

12. Test production mode (setup:static-content:deploy)

Switch to production mode by running the setup:static-content:deploy command to compile static assets like CSS, JavaScript, and images. This step is essential for optimising your site’s performance in a live environment.

Verify that all features and assets load correctly and that the site performs well under production settings.

13. Test the admin panel

Log in to the Magento admin panel and test all critical functionalities, such as managing sales orders, updating the product catalog, and reviewing customer data.

In particular, ensure that all admin workflows, including creating and editing products, managing stock, and processing orders, operate without errors. This is important because it will confirm the back-end stability of the update.

14. Push to update to the upgrade server

Once all tests in your staging environment are successful, push the updated Magento version to your upgrade server. This dedicated environment mirrors the live server, providing an additional layer of validation before going live.

Make sure that the upgrade server configuration matches production to accurately simulate real-world performance.

15. Submit upgrade server url for internal testing

Share the upgrade server URL with your internal team or stakeholders for thorough testing. Collect feedback on functionality, performance, and user experience. Address any issues they encounter to ensure a seamless transition when the update is deployed to the live site.

With the completion of these final steps, you can solidify the integrity of your Magento 2 update. In the process, you’ll ensure that both the front-end and back-end function as expected before making the changes live.

1 | Envisage Digital

Upgrade Magento Smoothly with Envisage Digital

Envisage Digital are your partner for all things Magento. Our comprehensive Magento services include tailored Magento development, seamless migrations, and strategic upgrades to keep your store at the cutting edge.

What’s more, our expert developers specialise in helping integrate your store with third-party systems, and perform code audits to ensure your site is running as smoothly as possible.

Get in touch with us today to explore how we can take your Magento store to new heights.

At Envisage Digital, we specialise in keeping your Magento store running at its best. Whether you're updating to the latest version, integrating third-party systems, or performing critical code audits, our tailored Magento services ensure your store remains cutting-edge and efficient.

Magento updates can be complex, but our expert developers make the process seamless. From planning and execution to thorough testing, we handle every step with precision - in the process minimising downtime and providing optimal performance for your platform.

Ready to enhance your store with the latest features and improvements? If so, get in touch with us today.

Depositphotos 189823050 Xl 1 1 | Envisage Digital

Our Services

Latest Posts

Google Rating
5.0
Based on 30 reviews
×
js_loader