H
10Corp Premium Hosting

Using the cPanel Terminal (Command Line)

Last Updated: 2025-01-01 3 min read

cPanel includes a built-in web-based terminal that provides command-line access to your hosting account directly from your browser. This is a convenient alternative to connecting via a dedicated SSH client, especially for quick tasks.

Accessing the cPanel Terminal

  1. Log in to cPanel.
  2. Navigate to the Advanced section.
  3. Click on Terminal.
  4. Accept the terms of use (first time only).

A terminal window opens in your browser, connected to your hosting account’s home directory.

What You Can Do

The cPanel terminal gives you access to a Linux command-line environment. Common tasks include:

File Management

ls -la                     # List files with details
cd public_html             # Change directory
cp file.txt backup.txt     # Copy a file
mv old.txt new.txt         # Rename/move a file
rm unwanted.txt            # Delete a file
find . -name "*.log"       # Search for files
du -sh *                   # Check folder sizes

Text Editing

nano filename.txt          # Edit a file with nano
cat filename.txt           # View file contents
head -50 error_log         # View first 50 lines
tail -100 access_log       # View last 100 lines
grep "error" logfile.txt   # Search within a file

Database Operations

mysql -u username -p       # Connect to MySQL
mysqldump -u username -p database_name > backup.sql  # Export database

WordPress CLI (if available)

wp core version            # Check WordPress version
wp plugin list             # List installed plugins
wp cache flush             # Clear WordPress cache
wp search-replace 'old' 'new'  # Search and replace in database

Compression

tar -czf backup.tar.gz public_html/    # Create compressed archive
tar -xzf backup.tar.gz                 # Extract archive
zip -r backup.zip public_html/         # Create zip archive
unzip backup.zip                       # Extract zip archive

Limitations Compared to SSH

While the cPanel terminal is convenient, it has some limitations compared to a full SSH connection:

FeaturecPanel TerminalSSH Client
Access methodBrowser-basedDedicated client (PuTTY, OpenSSH)
Session persistenceCloses when browser tab closesCan run persistent sessions (screen/tmux)
Session timeoutTimes out with cPanel sessionConfigurable timeout
Root accessNoNo (on shared hosting)
Long-running commandsMay timeoutBetter suited for extended operations
File transferNot supportedSCP/SFTP available through SSH
Key-based authNot applicableSupported

Important Notes

  • The cPanel terminal runs under your cPanel user account — you do not have root access.
  • Commands that require elevated privileges (sudo, apt-get, yum) are not available on shared hosting.
  • Be careful with destructive commands like rm -rf — there is no undo.
  • If the terminal is not visible in your cPanel, your hosting provider may have disabled it. Contact their support team to inquire about access.
  • For long-running processes, use a proper SSH connection with screen or tmux to prevent disconnection issues.
  • The terminal respects your hosting account’s resource limits — resource-intensive commands may be terminated by the server.

The cPanel terminal is a powerful tool for quick command-line tasks without needing a separate SSH client. For more complex operations or long-running processes, consider setting up a proper SSH connection.

Tags: cpanel hosting terminal command-line ssh

Still need help?

Our support team is available 24/7 to assist you.