Install Magento in cPanel
Magento installs on cPanel through Composer from the account terminal, not the old web wizard. Set PHP 8.2 or 8.3 and the required extensions, create a MySQL database, run composer create-project, then bin/magento setup:install. It worked when the storefront loads and the admin URL accepts your login.
For Indian developers launching a Magento Open Source store from a cPanel account without a managed platform.
knowledge
- Read time
- 4 min
- Sections
- 9
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 15 November 2026.
What does Magento 2.4 need before cPanel can run it?
Current Magento 2.4 releases need PHP 8.2–8.4 depending on the branch, MariaDB 10.11 or newer, Composer 2.2.26+ and an OpenSearch service — and a cPanel account missing any of these fails before the installer reaches its first screen. The exact supported pair changes per release, so match Adobe's system-requirements table for the version you pin.
| Requirement | What to set | Where in cPanel |
|---|---|---|
| PHP | 8.2/8.3 on 2.4.7; 8.3/8.4 on 2.4.8 — match the patch | MultiPHP Manager |
| Extensions | intl, soap, bcmath, gd, sodium, xsl, zip | Select PHP Version → Extensions |
| Database | MariaDB 10.11 (2.4.7) or 11.4 (2.4.8); MySQL 8.0 reached end of support 30 April 2026, and Adobe recommends MariaDB | MySQL Databases (the server decides the engine) |
| Search | OpenSearch 2.x (2.19 on 2.4.7, 3 on 2.4.8) | Not in cPanel — needs the server |
| Composer | 2.2.26 minimum; newer patches want 2.9.3+ | Terminal, or the host enables it |
| PHP memory | 2G for command-line work such as static deploy | MultiPHP INI Editor |
The search engine is the requirement people miss: Magento has shipped no built-in catalogue search since 2.4.0, so setup:install refuses to finish until it can reach OpenSearch on a host and port. That is a server-side service — on shared cPanel you depend on the host providing it, which is why most real Magento stores end up on a VPS.
Softaculous or Composer — which route?
Softaculous installs Magento in a few clicks and is fine when the version it offers is current; Composer is the route Adobe documents, always fetches the current patch, and leaves you the command line every later upgrade needs.
Before clicking Install in Softaculous, open its version dropdown and read it: a 2.3.x entry is years past end of life and receives no security patches. Softaculous also hides upgrades behind its own update screen, while a Composer install gives you composer update and the bin/magento toolchain for the life of the store. If you are serious about the store, start with Composer.
How do you set PHP, extensions and the database in cPanel?
Three cPanel screens do the groundwork: MultiPHP Manager for the PHP version, Select PHP Version for the extensions, and MySQL Databases for the schema — in that order.
- Open Software → MultiPHP Manager, tick the domain, choose PHP 8.3 (or 8.2 for the 2.4.7 branch) and apply — the account default is not enough if the domain overrides it.
- Open Software → Select PHP Version → Extensions and enable intl, soap, bcmath, gd, sodium, xsl and zip.
- Open Databases → MySQL Databases; create the database, create a user, then attach the user with All Privileges.
- Write down the full names: cPanel prefixes both, so the database is
cpuser_magento, notmagento. - Open Software → MultiPHP INI Editor and set
memory_limitto 2G for the domain; the command line reads a separate php.ini.
How do you install Magento from the cPanel terminal?
Composer asks for Adobe Marketplace credentials — create them in your Marketplace account under Access Keys, where the public key is the username and the private key is the password. Then one create-project command and one setup:install command do the whole job.
cd ~/public_html
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition store
cd store && bin/magento setup:install \
--base-url=https://shop.example.com/ \
--db-host=localhost --db-name=cpuser_magento \
--db-user=cpuser_mage --db-password=YOURPASS \
--admin-user=owner --admin-password=YOURPASS --admin-email=you@example.com \
--search-engine=opensearch --opensearch-host=127.0.0.1 --opensearch-port=9200
- Paste the public key as the username and the private key as the password when Composer asks.
- Watch setup:install to its final lines; it prints a random admin path such as
/admin_9f2k1. Save it — the login page does not exist at/admin. - Add the cron job under Advanced → Cron Jobs:
* * * * * /usr/local/bin/php /home/cpuser/public_html/store/bin/magento cron:run
Why must the domain point at the pub folder?
Magento serves everything from pub/; if the document root stays on the install folder, static files 404, the storefront can throw a 500, and app/etc/env.php — which holds the database password — becomes reachable over HTTP.
- Open Domains → Create A New Domain (or edit the existing entry) and set the document root to
public_html/store/pub. - If it is the account's primary domain, whose root cPanel fixes to
public_html, ask the host to change the document root — do not moveindex.phpby hand. - Run
bin/magento setup:static-content:deploy -f, thenbin/magento cache:flush.
How do you verify the storefront, admin and cron?
The install worked when the storefront shows the default Luma theme with its product grid, and the random admin path from the installer opens a login that accepts your admin user.
- Storefront: load the base URL; a 500 here is the document root or a missing extension, not the database.
- Admin: sign in at the printed path; a blank page after login means the static deploy did not run.
- Version:
bin/magento --versionshould print the same version the installer reported. - Cron: under Advanced → Cron Jobs confirm the job last ran; Magento writes its cron output to
var/log/magento.cron.log.
Which failures stop a cPanel install of Magento?
Five messages cover most broken cPanel installs, and each has one check to run before you reinstall anything.
| Message | Cause | Fix |
|---|---|---|
| 500 on every page right after install | Document root is the install folder | Set it to .../store/pub and reload |
| Magento supports PHP 8.x only | Account PHP differs from the release branch | MultiPHP Manager, pick the matching 8.x, re-run setup:install |
| SQLSTATE[HY000] [1045] Access denied | User not attached, or cPanel prefix dropped | Attach in MySQL Databases; use cpuser_dbname |
| Could not validate a connection to OpenSearch | Service down or wrong port | curl http://127.0.0.1:9200 should return JSON |
| Process killed during static deploy | memory_limit below 2G | Raise it in MultiPHP INI Editor and the CLI php.ini |
How much hosting does a Magento store actually need?
A live Magento 2 store is not a small shared-hosting workload: plan on roughly 2 vCPU, 4 GB RAM and 20 GB of disk once OpenSearch, the database and PHP-FPM share the machine, with a large catalogue pushing memory to 8 GB. Magento Open Source itself carries no licence fee — the cost is the hosting.
WebJi® Magento hosting is quoted by email before payment because the plan follows your catalogue and search index rather than a fixed tier. If you already manage the server side yourself, VPS hosting starts from ₹499 a month (quoted per configuration), and cPanel hosting lists at ₹297 a month before 18% GST (20 GB disk, 200 GB bandwidth, 10 email IDs, 1 domain) — a separate product from WebJi®'s Linux shared plans, which use the ControlPanel.Systems panel.
For a stuck install, email support@webji.services with the setup:install output, the PHP version from MultiPHP Manager and the newest error line — support runs 24/7 in Hindi and English with a published average first reply under 60 minutes.
Frequently asked questions
Can I install Magento on cPanel shared hosting?
Magento 2.4 will install, but a 1 GB shared account usually fails setup:static-content:deploy or stalls at the search-engine check, because OpenSearch is a server-side service shared hosting rarely exposes. Treat 2 vCPU and 4 GB RAM as the practical floor for a live store.
What PHP version does Magento 2.4 need?
It moves with the release: 2.4.7 supports PHP 8.2 and 8.3, while 2.4.8 supports 8.3 and 8.4. Set the matching version per domain in MultiPHP Manager and check Adobe's system-requirements table before you pin a release.
Is Softaculous safe for Magento?
It works, but read the version field first. If Softaculous offers a 2.3.x entry, skip it — that branch is end of life with no security patches. Composer installs the current release and leaves the command line you need for every later upgrade.
Why does Magento show a 500 error after install?
The document root is the usual cause. Magento must serve from the pub folder; pointing the domain at the install root breaks static files and can expose app/etc/env.php, which contains the database credentials, to plain HTTP requests.
Do I need Elasticsearch or OpenSearch for Magento?
Yes — Magento 2.4 requires an external search engine, and setup:install needs its host and port before it finishes. OpenSearch 2.x is the common self-hosted choice today; Elasticsearch 7.17 reached end of support in January 2026, so new installs should not build on it.
Last editorial update: 15 November 2026. Prices follow the dated sources on this page; checkout confirms current charges.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.