Magento is a resource-intensive platform that requires specific server configuration. In this guide, we describe the system requirements for an optimally running Magento webshop. It is crucial to ensure that your hosting environment meets these requirements to maximize the performance of your webshop and guarantee a smooth user experience.

Magento 2.4.x System Requirements

PHP Version and Extensions

Required PHP version:

  • Magento 2.4.6+: PHP 8.1 or 8.2
  • Magento 2.4.4-2.4.5: PHP 8.1
  • Magento 2.4.3: PHP 7.4 or 8.0

It is important to always use the most recent version of PHP that is compatible with your Magento version. This not only ensures better performance but also improved security and new functionalities.

Required PHP extensions:

  • bcmath
  • ctype
  • curl
  • dom
  • fileinfo
  • gd (with FreeType)
  • hash
  • iconv
  • intl
  • json
  • libxml
  • mbstring
  • openssl
  • pcre
  • pdo_mysql
  • simplexml
  • soap
  • sockets
  • sodium
  • spl
  • tokenizer
  • xmlwriter
  • xsl
  • zip
  • zlib

These extensions are essential for the operation of Magento. Ensure they are enabled in your PHP configuration. This can often be done via your hosting provider's control panel.

Database Requirements

Supported databases:

  • MySQL 8.0 (recommended)
  • MariaDB 10.4 or higher
  • Percona 8.0

Database configuration:

  • InnoDB storage engine
  • utf8mb4 character set
  • utf8mb4_unicode_ci collation

Using the correct database configuration is crucial for the performance of your Magento webshop. The InnoDB engine, for example, offers better performance and support for transactions, which is essential for an e-commerce platform.

Memory Requirements

Environment Minimum Recommended
Development 2GB RAM 4GB RAM
Production (small) 4GB RAM 8GB RAM
Production (large) 8GB RAM 16GB+ RAM

PHP memory_limit:

  • Minimum: 756M
  • Recommended: 2G or higher
  • For large import/export: 4G

A good memory configuration is crucial for the performance of Magento. If you notice that your webshop is slow or frequently crashes, increasing the memory may be a solution.

Web Server

Supported web servers:

  • Apache 2.4 with mod_rewrite
  • Nginx 1.x (recommended for performance)
  • LiteSpeed (excellent performance)

Apache configuration:

<Directory /var/www/html/magento>
    AllowOverride All
    Require all granted
</Directory>

The choice of web server can have a significant impact on the performance of your Magento webshop. Nginx is often preferred due to its efficiency and speed, especially under high traffic volumes.

Disk Space

Minimum space:

  • Magento installation: 2GB
  • Media/uploads: depending on products
  • Database: depending on catalog size
  • Logs and cache: 1-5GB

Recommended total: At least 10GB available

Optimizing PHP Configuration

memory_limit = 2G
max_execution_time = 18000
max_input_time = 600
max_input_vars = 10000
post_max_size = 64M
upload_max_filesize = 64M
realpath_cache_size = 10M
realpath_cache_ttl = 7200
opcache.enable = 1
opcache.memory_consumption = 512
opcache.max_accelerated_files = 60000
opcache.validate_timestamps = 0

OPcache Configuration

OPcache is essential for Magento performance:

opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=512
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=60000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=0
opcache.save_comments=1

MySQL/MariaDB Configuration

[mysqld]
innodb_buffer_pool_size = 2G
innodb_log_file_size = 512M
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT
max_connections = 500
query_cache_size = 0
query_cache_type = 0
tmp_table_size = 256M
max_heap_table_size = 256M

Elasticsearch/OpenSearch

Starting from Magento 2.4, a search engine is mandatory:

  • Elasticsearch 7.x or OpenSearch 1.2+
  • Minimum 512MB heap size
  • Recommended 2GB heap for larger catalogs

Elasticsearch significantly improves the search functionality of your webshop. It allows you to quickly and efficiently search through large amounts of product data, which is crucial for a good user experience.

Redis significantly improves performance:

  • Session storage: Faster sessions than file-based
  • Cache backend: Faster cache than file-based
  • Full Page Cache: Better FPC performance

Using Redis can significantly improve your webshop's loading times, especially during high visitor volumes. This is particularly important during peak periods, such as holidays or special promotions.

Checking if Your Hosting Meets Requirements

Via DirectAdmin

  1. Go to PHP Version or PHP Settings
  2. Check the PHP version and settings
  3. View available extensions

Via phpinfo()

  1. Create a file info.php with content: <?php phpinfo(); ?>
  2. Open the file in your browser
  3. Check all settings
  4. Delete the file after checking (security risk)

Via Magento Readiness Check

Magento's installation wizard automatically checks:

  • PHP version and extensions
  • Database connectivity
  • Write permissions
  • Memory limit

When to Upgrade?

Consider a more powerful hosting package if:

  • You regularly receive timeout errors
  • The admin responds slowly
  • Import/export fails due to memory limits
  • Your catalog grows above 10,000 products

Hosting Package Advice

Choose the right package for your Magento shop:

Starter Shop (up to 500 products)

  • Minimum 4GB RAM
  • 10GB disk space
  • Shared hosting may suffice

Growing Shop (500-5000 products)

  • 8GB RAM recommended
  • SSD storage
  • VPS or dedicated server

Enterprise (5000+ products)

  • 16GB+ RAM
  • Dedicated server
  • CDN for media

Need Help?

We are here for you! Are you facing any issues or have questions? Our support team is happy to assist you personally. Send us a message via the ticket system - we usually respond within a few hours and are happy to help.