cPanel

Use the cPanel Terminal: command line in your browser

Open a shell on your hosting account from cPanel Terminal without an SSH client, and use practical commands for WP-CLI, file searches, permissions and databases.

IntermediatecPanel hosting2 min read

cPanel Terminal opens a command line on your hosting account inside the browser. It is the same restricted shell you get over SSH, but with no client or keys to set up. It is handy for jobs that are slow or impossible in File Manager, such as extracting a big archive, searching thousands of files or running WP-CLI.

Before you start

  • Terminal must be enabled for your account (it uses shell access). If Advanced → Terminal is missing, ask support.
  • Commands run with your account's permissions. A wrong rm command deletes files immediately, with no Recycle Bin. Take a backup before big changes.

Open Terminal

  1. Go to cPanel → Advanced → Terminal.
  2. The first time, read the warning and click I understand and want to proceed.
  3. You start in your home directory, /home/cpuser. Your website's main folder is public_html.

Useful commands

TaskCommand
Go to the web rootcd ~/public_html
List files with sizesls -lah
Largest foldersdu -sh ~/* | sort -h
Count files (inodes)find ~ -type f | wc -l
Extract a ZIPunzip site.zip -d ~/public_html
Extract tar.gztar -xzf backup.tar.gz
Search text in filesgrep -rl "old-domain.com" ~/public_html
Files changed in last 2 daysfind ~/public_html -type f -mtime -2
Fix permissionsfind ~/public_html -type d -exec chmod 755 {} \; and find ~/public_html -type f -exec chmod 644 {} \;
Import a databasemysql -u cpuser_user -p cpuser_db < dump.sql
Export a databasemysqldump -u cpuser_user -p cpuser_db > dump.sql

WordPress with WP-CLI

WP-CLI is installed on most cPanel servers. Run commands from the WordPress folder:

cd ~/public_html && wp core version && wp plugin list
  • Update everything: wp core update && wp plugin update --all && wp theme update --all
  • Replace a domain safely, including serialized data: wp search-replace 'http://old.com' 'https://new.com' --skip-columns=guid
  • Reset an admin password: wp user update admin --user_pass='NewStrongPass!'
  • Disable all plugins when the site is broken: wp plugin deactivate --all

Tip: Long-running commands stop when you close the tab. For large jobs use nohup command &, or schedule them with cron jobs.

Limits of the shell

  • No sudo or root access; you cannot install system packages or restart services.
  • Processes count toward your CloudLinux CPU and memory limits and are stopped if they exceed them.
  • Language versions: php -v shows the CLI PHP. For a specific version use paths like /opt/cpanel/ea-php83/root/usr/bin/php or /opt/alt/php83/usr/bin/php.

Troubleshooting

  • Terminal does not load: browser extensions or a network proxy may block the WebSocket. Try another browser or network.
  • "command not found": the tool is not installed for users, or not in your PATH. Ask support.
  • "Permission denied": you are trying to write outside your home directory, or file ownership is wrong; contact support to fix ownership.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.