Most websites (including WordPress, Joomla, and custom PHP apps) need a MySQL database. Here is how to create one in cPanel.
Step 1: Create the Database
- Log in to cPanel.
- In the Databases section, click MySQL Databases.
- Under Create New Database, type a name for your database (e.g., mysite_db). Note that cPanel will prefix it with your cPanel username (e.g., cpanelusername_mysite_db). Write down the full name.
- Click Create Database. You will see a success message.
- Click Go Back.
Step 2: Create a Database User
- Scroll down to MySQL Users.
- Enter a username (e.g., mysite_user). The full username will include your cPanel prefix.
- Set a strong password. Click Password Generator if you need help creating one.
- Click Create User.
- Click Go Back.
Step 3: Assign the User to the Database
- Scroll down to Add User To Database.
- Select your user and your database from the dropdowns.
- Click Add.
- On the Manage User Privileges page, tick the ALL PRIVILEGES checkbox.
- Click Make Changes.
Using Your Database in WordPress
When installing WordPress manually, you will need these details:
- Database Name: the full name (e.g., cpanelusername_mysite_db)
- Database Username: the full username (e.g., cpanelusername_mysite_user)
- Database Password: the password you set
- Database Host: localhost
Tip: Use phpMyAdmin (found in cPanel) to import or manage your database. Click phpMyAdmin, select your database from the left panel, and use the Import tab to upload a .sql file.
