StarDomain

Using the Terminal in cPanel

Using the Terminal in cPanel

cPanel includes a built-in web-based terminal that gives you command-line access directly from your browser. No SSH client software is required.

Accessing the Terminal

  1. Log in to cPanel
  2. Scroll to the Advanced section
  3. Click Terminal
  4. Accept the terms of use if prompted
  5. The terminal opens with you logged in as your cPanel user

What You Can Do

File Operations

bash
# List files
ls -la ~/public_html/

# Copy files
cp file.txt backup_file.txt

# Move or rename
mv oldname.php newname.php

# Create directories
mkdir ~/public_html/uploads

# Find large files
find ~/public_html -type f -size +10M -exec ls -lh {} ;

# Extract an archive
unzip website-backup.zip -d ~/public_html/

WordPress Management (WP-CLI)

bash
cd ~/public_html

# Check version
wp core version

# Update WordPress
wp core update

# Update all plugins
wp plugin update --all

# Clear cache
wp cache flush

# Search and replace URLs (useful after migration)
wp search-replace 'http://' 'https://' --all-tables

# Create a new admin user
wp user create newadmin [email protected] --role=administrator --user_pass=SecurePass123!

# Export database
wp db export backup.sql

Package Management

bash
# Node.js
node -v
npm install
npm run build

# Python
python3 --version
pip3 install flask --user

# Composer (PHP)
composer install
composer require package/name

# Ruby (if available)
gem install bundler
bundle install

Database Operations

bash
# Connect to MySQL
mysql -u cpaneluser_dbuser -p cpaneluser_dbname

# Import database
mysql -u cpaneluser_dbuser -p cpaneluser_dbname < backup.sql

# Export database
mysqldump -u cpaneluser_dbuser -p cpaneluser_dbname > backup.sql

Git Operations

bash
cd ~/public_html

# Clone a repository
git clone https://github.com/user/repo.git .

# Pull updates
git pull origin main

# Check status
git status

Useful Shortcuts

ShortcutAction
TabAuto-complete
Ctrl+CCancel command
Ctrl+LClear screen
Up/DownPrevious/next command
Ctrl+RSearch history
Ctrl+AJump to start of line
Ctrl+EJump to end of line

Limitations

  • Cannot install system packages (no root/sudo access)
  • Session may timeout after 10-15 minutes of inactivity
  • Resource usage is limited by your CloudLinux allocation
  • Cannot run long-running background processes (use cron jobs instead)

Troubleshooting

Terminal Not Loading

  • Clear browser cache and cookies
  • Try a different browser (Chrome recommended)
  • Disable ad blockers or browser extensions

Command Not Found

  • Use full paths: which php to find the correct path
  • Some tools may not be installed by default — check with support

Permission Denied

  • You can only access files under your home directory
  • Reset permissions: chmod 755 directory or chmod 644 file

Need help? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.