How to Create a Database in cPanel and Connect it to Your Website

Introduction

If you want to run a WordPress site, Laravel application, or any CMS, you’ll need a database. In this guide, you’ll learn how to create a database in cPanel using the Database Wizard. This step-by-step tutorial makes it easy, even if you are a beginner.

Step 1: Open the Database Wizard in cPanel

Select Database Wizard in cPanel to create a new database

Log in to your cPanel dashboard. Scroll down to the Databases section and click on Database Wizard. This tool will guide you through the process of creating a database easily.

Step 2: Create a New Database

Step 1 in cPanel Database Wizard - Create a new database

In the first step, type a name for your database. Keep it simple but clear, for example: blog_db or shop_data.

Once done, click on Next Step to continue.

Step 3: Create a Database User

Step 2 in cPanel Database Wizard - Create database user with strong password

Now you need to add a user who can manage the database. Enter a username and create a strong password (use the password generator if needed).

When you’re ready, click Create User.

Step 4: Assign User Privileges

Step 3 in cPanel Database Wizard - Assign all privileges to database user

Finally, assign privileges to your new database user. For most cases, you should select All Privileges so the user can fully manage the database.

Click on Next Step to finish the setup.

Conclusion

Illustration showing database setup process in cPanel

Congratulations 🎉 You have successfully learned how to create a database in cPanel. You can now connect your database to WordPress, Laravel, or any application you want to run.

 

 

author
Meysam Mokhtari

Developer & Web Security