Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

cPanel

What the Exponential sources say about cPanel hosts (tier 3, expected to work; EasyApache PHP per account; Velocity may not be allowed) and a hedged, generic approach to setting up an Exponential account there, with a…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/hosting/panels/cpanel.md

On this page

cPanel

This page is for hosting companies that run cPanel servers and want to offer Exponential on them. It answers what the Exponential sources say about cPanel, what that means in practice, and how to test it before you sell it. The project has not watched Exponential run on cPanel; this page is therefore careful to separate what the sources state from general advice.

Warning

.htaccess slows down every request. When .htaccess files are enabled (AllowOverride anything but None), let alone used, Apache looks for them and reads and evaluates them on every request, in every directory of the path, and page loading times go up drastically (measured). The only real fix is to switch the feature off for the virtual host: AllowOverride None in the HTTPS virtual host, and the rules in the virtual host's own configuration as mod_rewrite rules. That is far faster in production speed tests and well worth the time it takes to optimize a production configuration. Switch over right away: copy the rules of the example HTTPS virtual host into your virtual host (with the static cache, also staticcache_offload.conf), set AllowOverride None, run apachectl configtest, reload Apache and test the site. The same rules for other servers: nginx, LiteSpeed, Caddy, IIS, Velocity (built in); where virtual host rules go in a control panel: Plesk, cPanel, DirectAdmin, ISPConfig. On LiteSpeed or OpenLiteSpeed, the server's own page cache can also answer anonymous visitors and crawlers without PHP: Page caching with LiteSpeed and OpenLiteSpeed.

Note

The Exponential sources describe no cPanel screens or menus. Where this page refers to a panel feature, it does so generically ("the panel's PHP selector", "the panel's cron page"); check cPanel's documentation for the names and steps in your version.

Contents

  1. What the sources say
  2. What it means in practice
  3. Setting up an account (generic)
  4. Composer on cPanel
  5. Velocity on cPanel
  6. A test plan
  7. Checklist

What the sources say

StatementSource
cPanel hosts are tier 3, expected to work: "a reasoned expectation, not a test result"Tier 3
"EasyApache (EA-PHP 8.x), per-account PHP"the same table
"shared hosting may forbid long-running processes, so Velocity may not be allowed; use Apache or LiteSpeed with .htaccess"the same table
"on shared hosting without shell access, the setup wizard in the browser is the installer"Containers, cloud and hosting panels
ezupdate looks for Composer in /opt/cpanel/composer/bin/, among other placesezupdate settings

That is everything the sources say about cPanel specifically.

What it means in practice

Exponential's needs do not depend on the panel. A cPanel account that offers the following runs Exponential, by the same reasoning that puts cPanel in tier 3:

  • PHP 8.0 or later (PHP 7.4 usable without support) for the account, with the required extensions: dom, libxml, simplexml, xsl, mbstring, iconv, intl, pcre, json, session, zlib, one database extension, gd or ImageMagick (2.3 PHP extensions). xsl and intl are critical tests of the setup wizard, and are the ones most often missing from a default PHP build.
  • The php.ini values the wizard checks (2.5).
  • Apache (or LiteSpeed) reading .htaccess, with mod_rewrite.
  • A database: 1. SQLite 3 needs none; otherwise one of the servers in the official order, 2. PostgreSQL · 3. MongoDB · 4. MariaDB · 5. Oracle · 6. MySQL (Microsoft SQL Server is known to be possible with additional work at this time). On a typical cPanel server this is the MariaDB or MySQL server the panel manages.
  • A cron job for runcronjobs.php.

Setting up an account (generic)

The following is general advice derived from the Exponential requirements, not from cPanel documentation:

  1. Choose PHP 8.x for the account in the panel's PHP selector, and enable the required extensions in the panel's extension settings. Use the same version for the command line if the account has a shell.
  2. Point the domain's document root at the installation root (the directory with index.php).
  3. Copy the rewrite rules: cp .htaccess_root .htaccess (or upload .htaccess_root as .htaccess) (8.5.1). With cPanel's Terminal (or SSH) the console does it for you, as the account's user: php bin/php/console exp:setup:htaccess --apply, and php bin/php/console exp:setup:config --apply for config.php. Without a shell, copy the files in the File Manager (it hides dot files until you switch on "Show Hidden Files") (Setting up .htaccess and config.php from the console).
  4. Create the database and its user in the panel, if not SQLite. For MariaDB or MySQL use utf8mb4 (9.3). Since 6.0.15 the wizard needs privileges on that database only (A clean installation that fits shared hosting).
  5. Upload the code with vendor/, or run Composer in a shell if there is one (next section).
  6. Open the setup wizard in the browser and follow its system check (Chapter 5).
  7. Add the cron line in the panel's cron page, with the account's PHP (Cron and shell access).
  8. Install the certificate with the panel's certificate management and redirect HTTP to HTTPS (TLS certificates in panels).

Warning

Do not delete rules from .htaccess to make something work. The rules decide which files Apache may hand out; everything else goes to index.php, which keeps settings/*.ini and the SQLite database private (13.2).

Composer on cPanel

  • With a shell: run composer install with the account's PHP version, so Composer resolves packages for the PHP that will run them (Command line and web PHP).
  • In the administration: the ezupdate extension searches /opt/cpanel/composer/bin/ among its default Composer locations, and can download a SHA-256 verified composer.phar into var/ezupdate/ with Get Composer. Updating and installing from the browser are off until [UpdateSettings] AllowUpdate and AllowInstall are enabled (ezupdate).
  • Without either: build the tree with composer install elsewhere, on the same PHP version, and upload it.

Velocity on cPanel

Velocity is a long-running process. On shared cPanel accounts it "may not be allowed"; the sources' answer is Apache or LiteSpeed with .htaccess. On a cPanel server where you, the host, control the machine, Velocity could run beside the panel's Apache as on the project's Plesk server, but that combination is not described in the sources. If you try it, read Velocity beside Apache or nginx and keep the one-user rule for var/ (8.7.2).

A test plan

Turn tier 3 into evidence on your own platform before customers depend on it:

StepPass when
Install with the setup wizard on a fresh accountevery critical test passes; the site and /admin answer
Request /settings/site.ini, /.env, /composer.json404 or an Exponential page, never the file's content (13.2)
Upload an image in the administrationthe image and its variations are served
Run runcronjobs.php from the panel's cronoutput in the cron log, Setup > Cronjobs shows the run
Back up and restore to a second accountthe restored site works (10.9)
Update one extension (ezupdate or Composer)the site works after the update

If it all passes, the project wants to hear about it: "If you run Exponential on a tier 3 system, please tell the project ... and the row moves up" (The four tiers).

Checklist

  • To do: PHP 8.x with xsl, intl and the other required extensions for the account.
  • To do: Document root at the installation root; .htaccess from .htaccess_root.
  • To do: Database (or SQLite) ready; UTF-8.
  • To do: vendor/ present; Composer route decided.
  • To do: Cron line with the account's PHP.
  • To do: Certificate and HTTPS redirect.
  • To do: The test plan passed on your platform.

A public demo on cPanel. Set EXP_DEMO_MODE=1 for the demo's account only: SetEnv EXP_DEMO_MODE 1 in the site's .htaccess (Apache or LiteSpeed), and EXP_DEMO_MODE=1 on its own line at the top of the account's cron jobs. Demo mode for hosts, Demo mode examples.

The LiteSpeed page cache on cPanel. With LiteSpeed as the web server, its page cache answers anonymous visitors and crawlers without PHP. Switch it on per site with the commented block of .htaccess_root in the account's .htaccess, or as an include file below /etc/apache2/conf.d/userdata/ssl/2_4/<user>/<domain>/ (litespeed-page-cache.conf). Step by step: Page caching with LiteSpeed and OpenLiteSpeed.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x