Knowledge Base

How do I create a website database and database user?

In cPanel, open Manage My Databases. Create the database under Create New Database, create its user under Add New User, then use Add User To Database to connect the two. On Manage User Privileges, grant the access your website needs and choose Make Changes. Keep the full database and username, including their account prefixes, for your website's setup.

Plan the new database

  • Sign in to your account, find the correct hosting service in Services and choose Log in to cPanel. On a phone, choose cPanel.
  • Use a new database and a separate user for the website you are setting up. Do not rename, delete or reset an existing site's database user to make space for the new site. The existing site may depend on those credentials.
  • If you are moving an existing website, back up its database and files first. Creating an empty database does not copy content from another server. You will import the copy as a separate step.
  • In cPanel, open Manage My Databases. Create the database and user here, rather than using phpMyAdmin to create them. This keeps them associated with your hosting account for its database management and backups.

Create the database

  • Under Create New Database, enter the new name in New Database. The account prefix is shown before the field. Enter the suffix you want; keep a record of the complete name with that prefix.
  • Check that the name is for the intended new website, then choose Create Database. Wait for the result before trying again. If an error appears, read it and check whether the database already exists rather than creating several copies.
  • Return to Manage My Databases and check Current Databases. Confirm that the full new name appears. This creates the database itself, not a database user or a working website connection.

Create the user and grant access

  • Under Database Users → Add New User, enter the new Username suffix. Its account prefix is displayed separately. Keep the full username, not just the part you type.
  • Enter a strong, unique Password and repeat it in Password (Again). Store the password securely with the full database name and username. These are database credentials, separate from your account, cPanel and WordPress administrator passwords.
  • Review the username and choose Create User. Wait for confirmation, then return to Manage My Databases.
  • Under Add User To Database, select your new full username in User and the intended database in Database. Double-check both names, then choose Add.
  • On Manage User Privileges, check the displayed User and Database again. Select the privileges required by your application's installation instructions. ALL PRIVILEGES grants full control of the selected database; use it only when the application requires that access. Do not grant this new user access to unrelated databases.
  • Choose Make Changes to save the selected privileges. After confirmation, use Go Back. Check that Current Databases → Privileged Users lists the intended user beside the new database.

Connect the website

  • During the website's setup, enter the full database name, full username and saved password. Use the database server address confirmed for your hosting service or supplied in its setup instructions. Do not guess the address from your website domain or copy another customer's example.
  • If you need to import an SQL backup, follow our phpMyAdmin import guide after checking the target database. Importing data and giving the website access are separate steps.
  • When moving a working site, keep the existing connection details until the replacement has been prepared and checked. Changing its configuration to an empty database can make its pages or content disappear from view. Use our WordPress migration guide to coordinate the move.
  • If creation, access or the website connection fails, open Support → New Ticket and set Department to Tech/Server. Include the domain, full database/user names and exact error. Do not send the database password or a configuration file containing it.