Skip to main content
MagentoApril 17, 20255 min read

How to Upgrade Magento 2 from 2.4.7 to 2.4.8

Keeping Magento current is critical for security, performance, and compatibility. This step-by-step guide walks developers through upgrading from Magento 2.4.7 to 2.4.8, covering system requirements, pre-upgrade checks, Git workflow, Composer commands, and post-upgrade validation.

Magento 2.4.8 brings security patches, performance improvements, and a handful of compatibility fixes. If you're still on 2.4.7, it's worth upgrading sooner rather than later -- the longer you wait, the more drift accumulates between your codebase and upstream. Here's how we typically handle it.

Quick Navigation

1. System Requirements

First things first -- make sure your server actually meets the 2.4.8 requirements:

  • PHP 8.3.x
  • Composer 2.5+
  • MySQL 8.0
  • Elasticsearch 7.10 or OpenSearch 2.x
  • Redis 7.x
  • Node.js 18.x
  • Ubuntu 22.04 / 24.04

2. Pre-Upgrade Checks

Don't skip this part. I've seen upgrades go sideways because someone forgot to check module compatibility.

  • Back up everything: database, files, media, and configuration
  • Check that every custom and third-party module works with 2.4.8
  • Grep through your code for deprecated functions and core overrides -- they'll bite you
  • Spin up a staging environment and run the upgrade there first

3. Git Workflow

Always use a dedicated branch. If something breaks, you can roll back cleanly:

git checkout -b upgrade-to-2.4.8
git tag before-2.4.8-upgrade

Commit composer.json, composer.lock, and all theme/module files before moving forward.

4. Upgrade Commands

4.1 Update Magento via Composer

composer require magento/product-community-edition 2.4.8 --no-update
composer update

4.2 Run the Magento Upgrade

bin/magento maintenance:enable
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
bin/magento maintenance:disable

5. Post-Upgrade Tasks

Rebuild all indexes:

bin/magento indexer:reindex

Fix file permissions (they tend to get messed up during upgrades):

find var generated vendor pub/static pub/media app/etc -type f -exec chmod 644 {} \;
find var generated vendor pub/static pub/media app/etc -type d -exec chmod 755 {} \;

Then check var/log/exception.log and var/log/system.log -- if there are errors, you want to catch them now, not after you've disabled maintenance mode on production. Walk through the storefront, test checkout, and log into the admin to make sure nothing's broken.

6. Common Issues

  • PHP errors -- Usually means PHP 8.3 or a required extension isn't installed. Double-check with php -m.
  • Broken themes -- Theme compatibility is the most common headache. Look for deprecated layout handles.
  • Module errors -- Third-party modules are the wild card. Disable them one by one to isolate the problem.
  • Deployment failures -- Make sure composer.lock is committed and caches are cleared before deploying.

7. Final Checklist

  • Staging upgrade completed and tested
  • Production backups verified and restorable
  • Git repo clean, no uncommitted changes
  • Third-party integrations tested (SMTP, payment gateways, CDN)
  • Team notified about the maintenance window

Note: If you need help with staging, backups, or a fully managed upgrade, our team at Private DevOps is ready to assist.

Wrap Up

The 2.4.8 upgrade is straightforward if you've done your homework. Good backups, a clean Git workflow, and testing on staging first will save you from most surprises. If you're unsure about any step or have heavily customized modules, it's worth getting a second pair of eyes on the process before touching production.

Need help with this?

Our team handles this kind of work daily. Let us take care of your infrastructure.