Magento 2.4.7 and 2.4.8 require PHP 8.2 or 8.3 with 18 core extensions, OpenSearch 2.12+ (or Elasticsearch 8.x), MySQL 8.0 or MariaDB 10.6/10.11 LTS, Composer 2.2+, and Redis 7.x. Production stores need at least 4 vCPUs, 8 GB RAM, and NVMe SSD storage to avoid PHP-FPM and JVM heap exhaustion.
Meeting the official magento 2 system requirements is the single biggest factor separating fast, stable storefronts from constant 502 timeouts. Below is the exact 2026 software matrix—covering PHP 8.2/8.3, OpenSearch 2.x, MariaDB/MySQL, Redis, and baseline NVMe hardware sizing for production stores.
PHP 8.2 / 8.3 with OPcache, Composer 2.2+, and Nginx 1.24+ serving strictly from /pub.
Mandatory OpenSearch 2.12+ cluster paired with MySQL 8.0 or MariaDB 10.6 / 10.11 LTS.
4 GB RAM minimum for dev/CI; 8 GB–16 GB RAM and 4+ NVMe vCPUs for live storefronts.
1. The Modern Magento 2 Stack: Why Legacy Configurations Fail
Generic LAMP stacks built for WordPress or Laravel fail within seconds of running bin/magento setup:install. Magento 2.4.7 and 2.4.8 enforce strict dependency constraints at both the Composer package level and the runtime service level. Specifically, Magento’s catalog search module no longer ships with a MySQL full-text fallback; if your server lacks an active Java-based search daemon listening on port 9200, catalog indexing and product saves throw fatal exceptions.
Beyond search, Magento’s dependency injection compilation (setup:di:compile) and static content deployment (setup:static-content:deploy) consume massive bursts of single-threaded CPU and PHP memory. A host running PHP 7.4, MySQL 5.7, or a 256 MB memory_limit cannot even complete a Composer update. Before provisioning a server, review the complete software compatibility table below for Magento 2.4.6, 2.4.7, and 2.4.8.
| Stack Layer | Magento 2.4.6 | Magento 2.4.7 | Magento 2.4.8 (2026 Baseline) |
|---|---|---|---|
| PHP Version | 8.1, 8.2 | 8.1, 8.2, 8.3 | 8.2, 8.3, 8.4 |
| Search Engine | OpenSearch 1.2 / 2.5+ | OpenSearch 2.12+ (Recommended) | OpenSearch 2.15+ / 2.17 |
| Database | MySQL 8.0 / MariaDB 10.6 | MySQL 8.0 / MariaDB 10.6, 10.11 | MySQL 8.0, 8.4 / MariaDB 10.11, 11.4 |
| Composer | 2.2 LTS / 2.5+ | 2.2 LTS / 2.7+ | 2.7+ / 2.8 |
| Redis | 6.2 / 7.0 | 7.0 / 7.2 | 7.2 / Valkey 7.2+ |
| Varnish Cache | 7.0 – 7.3 | 7.3 – 7.5 | 7.5+ |
| RabbitMQ | 3.9 – 3.11 | 3.11 – 3.13 | 3.13 / 4.0 |
If you are still deciding between infrastructure tiers for this stack, compare multi-tenant limits against isolated cloud nodes in our shared vs VPS vs dedicated Magento hosting guide.
2. Official PHP 8.2 and 8.3 Compatibility & Extension Matrix
PHP 8.2 and PHP 8.3 are the production standards for Magento 2.4.7-p3 and 2.4.8 in 2026. PHP 8.1 reached security-only end-of-life status, meaning modern payment gateways and Composer dependencies increasingly require PHP 8.2 or 8.3. When deploying PHP 8.3, verify that your third-party marketplace extensions have been audited for dynamic property deprecation notices, which PHP 8.2+ flags as warnings during strict compilation.
Equally important is aligning your web server’s PHP-FPM binary with your SSH CLI PHP binary. A frequent deployment mistake occurs when cPanel or Ubuntu update-alternatives leaves the CLI pointing to PHP 8.1 while Nginx routes requests to PHP 8.3. Always verify both binaries match:
In php.ini for both CLI and FPM, set memory_limit = 2G (or 4G during setup:di:compile), max_execution_time = 1800 for CLI imports, and realpath_cache_size = 10M with realpath_cache_ttl = 7200 to reduce filesystem stat() calls across Magento’s deep vendor directory tree.
2.1 Mandatory PHP Extensions Required by Magento Core
Magento’s composer.json enforces 18 required PHP extensions. Missing even one extension—most commonly ext-sodium, ext-intl, or ext-xsl on minimal Ubuntu/AlmaLinux images—halts Composer resolution immediately. Install the full set before pulling Magento packages:
bcmath&intl: Arbitrary-precision tax/currency math and ICU locale formatting for multi-storefront pricing.ctype,dom,libxml,simplexml,xsl: XML layout merging,di.xmlparsing, and SOAP/REST schema validation.curl,openssl,sockets,sodium: TLS 1.3 payment gateway API calls, Argon2id password hashing, and encryptedenv.phpcredentials.gd(orimagick) &fileinfo: Catalog product thumbnail resizing, WebP/JPEG processing, and MIME-type upload verification.mbstring,iconv,pdo_mysql,soap,zip: UTF-8 string handling, PDO database drivers, ERP SOAP integrations, and module archive extraction.
3. Mandatory Search Engine: OpenSearch 2.x vs Legacy Elasticsearch
Starting with Magento 2.4.6 and continuing through 2.4.7 and 2.4.8, OpenSearch 2.x is the primary supported search engine. While Adobe Commerce still supports Elasticsearch 8.x for enterprise clients with existing Elastic licenses, OpenSearch 2.12+ (Apache 2.0 licensed) is the default across open-source and cloud deployments because it drops proprietary licensing constraints while maintaining full REST API compatibility with Magento’s Magento_OpenSearch module.
OpenSearch runs as a separate Java Virtual Machine (JVM) service on port 9200. Because it maintains inverted indices for every searchable product attribute, SKU, and layered navigation filter, you must budget dedicated physical RAM for its JVM heap. Never leave OpenSearch on its default 1 GB heap on a 2 GB server—the Linux OOM killer will terminate the Java process mid-reindex.
3.1 Why Magento 2.4.4+ Refuses to Install Without OpenSearch
Magento removed the legacy MySQL search engine adapter in 2.4.0 because SQL LIKE '%term%' queries caused severe table locks on catalogs exceeding 10,000 SKUs. During bin/magento setup:install, Magento executes a pre-flight HTTP health check against the configured search host and port. If OpenSearch is unreachable or returns a red cluster status, installation aborts with Could not validate a connection to OpenSearch. For step-by-step installation and JVM heap tuning, follow our OpenSearch 2.x setup guide for Magento 2.
4. Relational Database Prerequisites: MySQL 8.0 vs MariaDB 10.6/10.11
Magento 2.4.7 officially supports MySQL 8.0 (and 8.4 in 2.4.8) as well as MariaDB 10.6 LTS and 10.11 LTS. MySQL 5.7 reached end-of-life and lacks window functions and CTE optimizations used in modern inventory and reporting queries. Regardless of whether you choose Percona Server for MySQL 8.0 or MariaDB 10.11, ensure the following database prerequisites are met:
- InnoDB Storage Engine Only: Every Magento table requires ACID transactions and row-level locking; MyISAM is unsupported.
log_bin_trust_function_creators = 1: Required if binary logging is enabled so Magento database triggers (used byUpdate by Schedulematerialized views) can be created without SUPER privileges.- Dedicated Buffer Pool: Allocate 60%–70% of database-dedicated RAM to
innodb_buffer_pool_sizeso active catalog, customer, and quote tables stay resident in memory. - Character Set: Use
utf8mb4andutf8mb4_unicode_cifor full emoji and multi-language catalog support.
Once your database is provisioned, fine-tune InnoDB thread concurrency and transaction log flushing using our MySQL and MariaDB optimization guide for Magento 2.
5. Hardware Sizing Baseline: vCPU, Physical RAM & NVMe Storage
Software compatibility alone will not keep a storefront online if the underlying compute lacks memory headroom or disk IOPS. Magento’s architecture runs four memory-hungry daemons simultaneously: PHP-FPM workers (~90–130 MB RSS each), MySQL/MariaDB InnoDB buffer pool, OpenSearch JVM heap, and Redis. Adding Varnish and RabbitMQ pushes baseline resident memory even higher.
| Environment Tier | vCPU Cores | Physical RAM | NVMe Storage | Expected Workload |
|---|---|---|---|---|
| Local Dev / CI | 2 vCPU | 4 GB RAM | 40 GB SSD/NVMe | Single developer, < 1,000 SKUs, no concurrent traffic |
| Starter Production | 4 vCPU | 8 GB RAM | 80 GB NVMe | Up to 10,000 SKUs, 1,000–3,000 daily visitors |
| Growth Storefront | 8 vCPU | 16 GB–32 GB RAM | 160 GB+ NVMe | 10,000–50,000 SKUs, active cron + ERP syncs |
| Enterprise / Split Tier | 16+ vCPU | 64 GB+ RAM | 320 GB+ RAID-10 NVMe | 50,000+ SKUs, flash sales, dedicated DB & search nodes |
5.1 Why 2 GB RAM Fails and 4 GB–8 GB Is the Production Floor
While legacy documentation once listed 2 GB of RAM as a minimum, 2 GB is unusable on Magento 2.4.7+. OpenSearch alone requires at least 1 GB of JVM heap (leaving ~1 GB for the OS, MySQL, and PHP-FPM). The moment you run bin/magento setup:di:compile—which routinely spikes PHP CLI memory to 1.5 GB–2.5 GB—the Linux kernel invokes the OOM killer and terminates MySQL or OpenSearch. For a reliable production floor, 8 GB RAM allows you to assign 3 GB to PHP-FPM, 2 GB to InnoDB, 1.5 GB to OpenSearch JVM, and 1 GB to Redis and OS overhead. You can calculate exact memory allocations for your catalog size in our Magento 2 RAM and CPU sizing guide.
6. Critical Supporting Services: Composer, Varnish, Redis & RabbitMQ
To achieve sub-200ms Time to First Byte (TTFB) and non-blocking checkout performance, production Magento 2 deployments rely on four supporting services:
- Composer 2.2+ / 2.7: Composer 1.x is completely deprecated and will fail to resolve Magento 2.4.7+ metapackages due to memory and API protocol changes.
- Varnish Cache 7.x: Replaces Magento’s built-in file-based Full Page Cache. Pair Nginx on port 443 for TLS termination with Varnish on port 80 and Nginx/PHP-FPM on port 8080. See our Varnish Cache VCL configuration guide.
- Redis 7.x (Two Instances): Run separate Redis instances for default/page cache (
allkeys-lrueviction) and customer sessions (noeviction) so cache flushes never log out active shoppers. - RabbitMQ 3.13: Offloads asynchronous bulk operations, inventory updates, and order export queues out of synchronous PHP-FPM web requests.
7. Pre-Installation Verification Script: Testing Compatibility in CLI
Before downloading Magento packages or running setup:install, run this quick shell audit on your Linux server to verify PHP version, required extensions, Composer version, MySQL connectivity, and OpenSearch health in one pass:
If every extension check returns clean and OpenSearch reports "status" : "green" or "yellow" (normal for a single-node setup), your environment satisfies all core magento 2 system requirements and is ready for deployment on managed Magento web hosting.
8. Frequently Asked Questions
What PHP version is best for Magento 2.4.7 in 2026?
PHP 8.3 is the recommended production runtime for Magento 2.4.7-p3 and 2.4.8, offering the best JIT/OPcache performance and active security support. PHP 8.2 is also fully supported if any legacy third-party module has not yet been certified for PHP 8.3.
Can I run Magento 2.4.7 without OpenSearch or Elasticsearch?
No. Adobe removed the MySQL search adapter starting in Magento 2.4.0. Both installation and catalog reindexing require an active OpenSearch 2.x (or Elasticsearch 8.x) service reachable over HTTP/HTTPS on port 9200.
Is 2 GB of RAM enough to install Magento 2?
No. While 2 GB with heavy swap might boot an idle sandbox, bin/magento setup:di:compile and OpenSearch JVM heap allocation routinely exceed 2.5 GB combined. Use 4 GB RAM as the minimum for development and 8 GB RAM for production.
Should I choose MySQL 8.0 or MariaDB 10.11 for Magento 2?
Both are officially supported by Magento 2.4.7. MySQL 8.0 (or Percona Server 8.0) offers slightly more predictable optimizer behavior on complex EAV catalog joins, while MariaDB 10.11 LTS provides an excellent drop-in open-source alternative on Rocky Linux and AlmaLinux.
Does Magento 2 require Nginx or Apache?
Magento supports both, though event-driven Nginx with PHP-FPM is strongly preferred for production because it eliminates per-request .htaccess directory scans and integrates cleanly with Varnish SSL termination. Always set your web root to /pub.
Deploy Magento 2.4.7 & 2.4.8 on a Pre-Validated Infrastructure Stack
Running Magento 2.4.x reliably requires PHP 8.2/8.3, OpenSearch 2.x, Redis, and Composer 2.2+ working together on isolated NVMe compute. Provisioning on a Magento-ready environment eliminates manual stack mismatches and prevents PHP-FPM or JVM heap exhaustion under real traffic.
