Terminal in cPanel: Command Line in Your Browser

Terminal is a command line right in your browser, inside cPanel. You can use it to run Composer, Git, PHP and CMS console commands, import large database dumps and unpack archives. No separate program or connection settings are needed.

How to enable Terminal

Terminal is turned off by default. To enable it for your account, contact support from your client area and include your hosting domain. Once it is enabled, the Terminal tool appears in cPanel.

SSH access to the hosting from external programs (PuTTY, Termius and similar) is not provided. The command line is available only through Terminal in cPanel.

How to open it

  1. On the cPanel home page, find the Advanced section and click Terminal. Or type "terminal" in the search box at the top of the page.
  2. The first time you open it, a warning about using the command line carefully appears. Click I understand and want to proceed.
  3. Terminal opens in your account's home folder. The website of the main domain is in the public_html folder.
The Terminal tool in the Advanced section
The Terminal tool in the Advanced section
The warning shown the first time
The warning shown the first time
Terminal: commands run in your account folder
Terminal: commands run in your account folder

What you can do

TaskCommand
Go to the website folder, list filescd ~/public_html, ls -la
Install PHP dependenciescomposer install
Update code from a repositorygit pull
Import a large database dumpmysql -u db_user -p db_name < dump.sql
Unpack an archiveunzip site.zip or tar -xzf site.tar.gz
Edit a filenano wp-config.php

PHP version. The php command in Terminal is the default version and may differ from your website's version. To run a command with a specific version, use its path, for example /opt/alt/php82/usr/bin/php artisan migrate for PHP 8.2. More about versions: different PHP versions for websites.

Node.js and Python. The npm and pip commands work inside an application environment. Create an application in Setup Node.js App or Setup Python App: the application page shows a command to enter its environment — copy it and run it in Terminal.

Limitations

  • Commands run as your account in a separate environment: only your own files are available. There are no server administrator rights (root, sudo), and you cannot install system packages.
  • Terminal is not suitable for programs that must run all the time: they stop when you close the tab. Use cron jobs for scheduled tasks and Setup Node.js or Python App for applications.

Be careful with commands that delete or overwrite files (rm, mv, >): deleted files cannot be restored from a trash bin. Make a backup before major changes.

Questions and answers
Terminal is enabled on request. Contact support from your client area and include your hosting domain.
No. On the hosting, the command line is available only through Terminal in cPanel.
Terminal uses the default PHP version. To run a command with your website's version, use the full path, for example /opt/alt/php82/usr/bin/php.
They are available inside a Node.js or Python application environment. Create the application in cPanel and run the command to enter its environment, shown on the application page.