CloudPanel: step 7. Database

In the examples 203.0.113.10 is your server address and my-site.com is your domain. The server address and panel password are in the e-mail with your credentials.

Site → "Databases" tab.

Create a database

  1. Click "Add Database".
  2. Database Name: lowercase Latin letters, digits, hyphen. E.g. my-site-db. Underscore is not allowed.
  3. User Name and password. Put them into the site configuration (wp-config.php, .env).
  4. Click "Add Database".
Database form
Database form
Database list
Database list

Connection from the site: host 127.0.0.1, port 3306, database name, user, password.

phpMyAdmin

The "Manage" button next to the database opens phpMyAdmin. No password needed.

phpMyAdmin
phpMyAdmin

Do not move a database via phpMyAdmin export/import. On large databases the import breaks off. Use the command below.

Import a dump

  1. Upload the dump (dump.sql or dump.sql.gz) via SFTP into the tmp folder of the site user.
  2. Connect via SSH as the site user. Run:
cd ~/tmp
clpctl db:import --databaseName=my-site-db --file=dump.sql.gz

Export: clpctl db:export --databaseName=my-site-db --file=dump.sql.gz.

Automatic copies

Every night at 03:15 the panel saves a dump of each database to /home/<site user>/backups/. Kept for 7 days. Copies of the whole server: Backups.