Useful CloudPanel Site User Commands (CLI)

Nemesis

New member
As a site user on CloudPanel, what useful commands are available to me for managing file permissions, databases, and the Varnish cache?
 
CloudPanel provides several helpful CLI commands that can be executed by site users via SSH. Here’s a quick reference to essential site user commands:




πŸ“Œ System (File Permissions)

  • Reset Permissions (Directories & Files): This command resets file and directory permissions recursively.

Code:
clpctl system:permissions:reset --directories=770 --files=660 --path=.

(Replace --path=. with your desired directory path.)

πŸ“Œ Database Management

  • Export Database (Backup): Export your database with optional gzip compression.

# Compressed (.gz)

Code:
clpctl db:export --databaseName=my-database --file=dump.sql.gz

# Uncompressed

Code:
clpctl db:export --databaseName=my-database --file=dump.sql

  • Import Database (Restore): Import your database from a dump file.

Code:
clpctl db:import --databaseName=my-database --file=dump.sql.gz




πŸ“Œ Varnish Cache Management

  • Purge Varnish Cache:
    • Purge entire cache:
    • Purge specific cache tags:
    • Purge specific URL:

These commands empower you as a site user to efficiently manage permissions, databases, and caching on your CloudPanel-managed sites.
 
Back
Top