Magento (now officially known as Adobe Commerce, with its free version being Magento Open Source) is one of the most powerful e-commerce platforms: it supports thousands or even hundreds of thousands of products, multiple shops and languages within a single system, complex pricing structures and B2B functionality. However, its power comes at a cost in terms of resources. A Magento 2 shop requires significantly more memory, processing power and additional services than a WordPress/WooCommerce online shop, which is why choosing the right hosting is particularly important here.
In this guide, we summarise the system requirements for Magento 2, explain why shared hosting isn’t suitable, what size VPS you’ll need, how to optimise it for fast performance, and what to look out for in terms of security and backups.
Why is Magento so demanding?
Magento is a modular, multi-layered system: every time a page is loaded, it loads numerous PHP classes, runs complex database queries (product data is stored in an EAV structure across many tables), and delegates search, caching and background tasks to separate services. A fast Magento shop is therefore not a single PHP application, but the coordinated operation of an entire software package.
Magento 2 system requirements
Magento Open Source 2.4.8 and later versions typically require this environment (always check the documentation for the current release for exact versions):
| Components | Requirements |
|---|---|
| Operating system | Linux (e.g. Ubuntu, Debian, AlmaLinux, Rocky Linux) |
| Web server | Nginx (recommended) or Apache |
| PHP | 8.3 or 8.4, with many packages (bcmath, intl, soap, sodium, xsl, zip, etc.) |
| Database | MySQL 8.4 or MariaDB 11.4 |
| Search engine | OpenSearch (mandatory; there has been no built-in search function since Magento 2.4) |
| Cache, sessions | Redis or Valkey |
| Page cache | Varnish (recommended for production environments) |
| Message thread | RabbitMQ (for larger online shops) |
| Miscellaneous | Composer, cron, SSH access |
| PHP memory | At least 2 GB memory_limit; more is required for installation and updates |
Is shared hosting enough?
Not since Magento 2.4. The system requires the OpenSearch search service to function, which is a separate Java application that uses a lot of memory; shared hosting plans do not support this. Furthermore, installing and updating Magento, as well as generating static files, requires SSH, Composer and a lot of memory, whilst background tasks require a cron job running every minute. A small test shop might run on a more powerful hosting plan, but for a live online shop, it is advisable to run Magento on a VPS or a dedicated server.
If you’re looking to set up a small online shop and don’t need Magento’s specialised features, WooCommerce runs just as well on shared hosting and is much cheaper to run.
How much VPS capacity do you need?
OpenSearch, Redis, the database and PHP-FPM together require a significant amount of memory, even for a small online shop.
| Online shop | vCPU | RAM | NVMe |
|---|---|---|---|
| Developer or test shop | 2–4 | 8 GB | 80 GB |
| Small live online shop (a few thousand products) | 4 | 8–12 GB | 80–120 GB |
| Medium-sized online shop (tens of thousands of products, regular promotions) | 6–8 | 16–24 GB | 160–240 GB |
| Large department store | 12–16 or more servers | 32 GB or more | 320 GB or more |
For large e-commerce sites, it’s worth putting the database and OpenSearch on separate servers. aWh’s KVM VPS plans range up to 16 vCPUs and 32 GB of RAM, with AMD Epyc processors and NVMe SSDs; for Magento, we recommend at least the AMD VPS 8 plan (4 vCPUs, 8 GB). If you outgrow this, you can upgrade to a larger plan.
Who manages it? Setting up and maintaining a Magento server is a major system administration task. If you don’t have a specialist for this, our managed VPS service takes care of the server installation, configuration and monitoring.
How to make Magento fast
- production mode. A live shop should always run in
productionmode, using pre-generated static files and compiled code (bin/magento deploy:mode:set production). - Varnish for full-page caching. Magento’s built-in page cache also works, but Varnish is much faster when dealing with high traffic.
- Redis or Valkey for application caching and sessions, rather than the file system.
- OPcache with sufficient memory and the latest supported version of PHP.
- Indexers run in ‘scheduled’ mode (Update by Schedule) to ensure that product backups do not slow down customer requests.
- Real cron: Magento’s background tasks (indexing, emails, cache clearing) should run every minute via the system’s cron.
- Database tuning: adjust the buffer size of MariaDB or MySQL to match the server’s memory.
- Images and CDN: WebP images, appropriate dimensions, and a CDN for static files.
- A lighter theme: the old Luma theme loads a lot of JavaScript; a modern, lighter frontend significantly improves Core Web Vitals metrics.
Security
- Updates: Adobe regularly releases security patches for Magento; make sure you install these as soon as possible, as Magento shops are popular targets for credit card data theft attacks (Magecart).
- Admin interface: a custom admin URL, two-factor authentication (Magento requires this to be built in), and, if possible, IP restriction.
- Payment via a third-party provider: if the customer enters their card details on the payment provider’s interface, your server does not handle any card details, which greatly simplifies PCI DSS compliance.
- File system permissions: permissions as specified in the Magento documentation, and the web server must not be able to write to the code.
- Server-level protection: firewall, Fail2ban, malware scanning, DDoS filtering (included as standard on aWh’s KVM VPSs). We’ve covered the details in our VPS security guide.
Backup
An online shop’s database is constantly changing, so in addition to daily server backups, you should also back up the database more frequently (for example, every hour), storing the backups separately from the server. Before updating Magento, always take a snapshot of your VPS so that you can restore it in a matter of minutes should an error occur; on aWh’s KVM VPSs, both daily backups and snapshots are included in the price. Our guide to backing up your VPS describes the options in detail.
Migration
When performing a migration of an existing Magento shop, you need to transfer the files, the database and the media files, then configure the associated services (OpenSearch, Redis, Varnish, cron) on the new server, re-index the site and build the cache. Check that everything is working on a test domain, and only then change the DNS settings, during a period of low traffic. If you get stuck, please get in touch with us.
Summary
Magento 2 is a powerful but resource-intensive e-commerce platform: it requires OpenSearch, Redis, plenty of memory and SSH, which is why it does not run reliably on shared hosting. A small live shop requires at least 4 vCPUs and 8 GB of memory with NVMe storage; larger ones require more. The key to fast performance is production mode, Varnish, Redis and well-configured indexing, whilst security relies on regular updates and a secure admin interface. If you do not wish to manage the server yourself, opt for a managed VPS.
Frequently Asked Questions
Is shared hosting enough for Magento 2?
No. Since Magento 2.4, it requires the OpenSearch search service, and installation and updates require SSH, Composer and plenty of memory, which is why we recommend a VPS or a dedicated server.
How much memory does a Magento shop need?
For a small live shop, you’ll need at least 8 GB; for a medium-sized one, 16–24 GB, as OpenSearch, the database, Redis and PHP all rely on this. The PHP memory_limit should be set to at least 2 GB.
Why is KVM VPS better for Magento?
Because it provides guaranteed processor and memory resources, with its own kernel, OpenSearch, Redis, Varnish and all other necessary services can be installed without any issues, and other customers’ traffic won’t slow down your online shop.
What does an NVMe SSD offer Magento?
Magento performs a huge number of small database and file operations; NVMe SSDs are many times faster than SATA SSDs in these tasks, which is immediately noticeable in the shopping basket, at the checkout and in the admin panel.
What is Varnish, and why is it important?
A caching proxy that serves entire pages from memory, meaning that product and category pages load very quickly by bypassing PHP and the database. Officially supported by Magento and recommended for live shops.
Which version of PHP should I use?
The version supported by your Magento installation and your extensions; version 2.4.8 supports PHP 8.3 and 8.4. Older versions of Magento may require an older version of PHP, in which case it is worth planning to update Magento as well.
How can you scale up your VPS if your traffic increases?
You can upgrade to a larger plan via the client portal; this will increase your processor power, memory and storage. For large online shops, you can also host the database and search engine on a separate server.
Can you help me with the migration of my Magento shop?
Yes, please do get in touch with us with the details. If you’d like us to take care of both the server setup and its operation, our managed VPS service is just the thing for you.