Some applications require PostgreSQL rather than MySQL. If your hosting plan includes PostgreSQL support, you can create and manage PostgreSQL databases through cPanel.
Please note: Screens and options may vary slightly depending on your cPanel version and hosting plan.
Creating a PostgreSQL Database
- Log in to your cPanel account.
- In the Databases section, click PostgreSQL Databases.
- Under Create New Database, enter a name for the database.
- Click Create Database.
Creating a PostgreSQL User
- On the same page, scroll to Add New User.
- Enter a Username and Password.
- Click Create User.
Assigning a User to a Database
- Scroll to Add User To Database.
- Select the user and database from the dropdowns.
- Click Submit.
Managing PostgreSQL with phpPgAdmin
If phpPgAdmin is available on your server:
- In the Databases section, click phpPgAdmin.
- Expand the server list and click on your database.
- You can browse tables, run SQL queries, import/export data, and manage schemas.
Connection Details
| Setting | Value | |---------|-------| | Host | localhost | | Port | 5432 (default PostgreSQL port) | | Database | Your database name (with cPanel prefix) | | Username | Your database username (with cPanel prefix) | | Password | Your database user's password |
Tips
- PostgreSQL availability depends on your hosting plan and server configuration. If you don't see the PostgreSQL option in cPanel, contact your hosting provider.
- PostgreSQL is commonly used with Python frameworks (Django, Flask), Ruby on Rails, and some enterprise applications.
- Backing up PostgreSQL databases follows the same principle as MySQL — use the cPanel Backup tool or the
pg_dumpcommand via SSH.
What Next?
- Backing Up and Restoring a Database — Back up your PostgreSQL database.
- Using SSH Access — Use command-line PostgreSQL tools.