21+ years in hosting · Jaipur, India · INR billing with 18% GST · 24/7 email support
Blog · WebJi® India

Install Magento in cPanel

Quick answer

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.

✓ In business since 2005
✓ INR + GST billing
✓ 24/7 Email Support — avg reply < 60 min
GuideWebJi®
knowledge
Read time
4 min
Sections
9
Updated
14 Nov 2026
Written by
WebJi® team

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.

Magento 2.4 requirements as Adobe publishes them, and where each lives in cPanel
RequirementWhat to setWhere in cPanel
PHP8.2/8.3 on 2.4.7; 8.3/8.4 on 2.4.8 — match the patchMultiPHP Manager
Extensionsintl, soap, bcmath, gd, sodium, xsl, zipSelect PHP Version → Extensions
DatabaseMariaDB 10.11 (2.4.7) or 11.4 (2.4.8); MySQL 8.0 reached end of support 30 April 2026, and Adobe recommends MariaDBMySQL Databases (the server decides the engine)
SearchOpenSearch 2.x (2.19 on 2.4.7, 3 on 2.4.8)Not in cPanel — needs the server
Composer2.2.26 minimum; newer patches want 2.9.3+Terminal, or the host enables it
PHP memory2G for command-line work such as static deployMultiPHP 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.

  1. 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.
  2. Open Software → Select PHP Version → Extensions and enable intl, soap, bcmath, gd, sodium, xsl and zip.
  3. Open Databases → MySQL Databases; create the database, create a user, then attach the user with All Privileges.
  4. Write down the full names: cPanel prefixes both, so the database is cpuser_magento, not magento.
  5. Open Software → MultiPHP INI Editor and set memory_limit to 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
  1. Paste the public key as the username and the private key as the password when Composer asks.
  2. 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.
  3. 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.

  1. Open Domains → Create A New Domain (or edit the existing entry) and set the document root to public_html/store/pub.
  2. 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 move index.php by hand.
  3. Run bin/magento setup:static-content:deploy -f, then bin/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 --version should 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.

Common Magento-on-cPanel failures and their single fix
MessageCauseFix
500 on every page right after installDocument root is the install folderSet it to .../store/pub and reload
Magento supports PHP 8.x onlyAccount PHP differs from the release branchMultiPHP Manager, pick the matching 8.x, re-run setup:install
SQLSTATE[HY000] [1045] Access deniedUser not attached, or cPanel prefix droppedAttach in MySQL Databases; use cpuser_dbname
Could not validate a connection to OpenSearchService down or wrong portcurl http://127.0.0.1:9200 should return JSON
Process killed during static deploymemory_limit below 2GRaise 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.

FAQ

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.

WebJi® since 2005

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.