TopSeoTutWordpress3 Easy Ways to Create Database for WordPress

3 Easy Ways to Create Database for WordPress

How to Create Database for WordPress
How to Create Database for WordPress

WordPress has become extremely famous over the past few years. It is one of the finest platforms and CMS (Content Management System) for designing and hosting comprehensive websites. WordPress is extremely popular for its ease of use and straightforward installation methods.

What is The Database?

The database is a type of software to manage and store your website’s data in an easy way. It organizes the data in tables according to its characters and patterns. The database is managed by many DBMS (Database Management System) such as MySQL, Microsoft Access, SQL Server, FileMaker, Oracle, and more.

What is The Database

WordPress uses MySQL as its database management system because both are open source software just like Apache and PHP. All web hosts have special tools and services for WordPress users. If you are planning to create a database for WordPress using cPanel or MySQL look no further. Here is a step-by-step guide on how to create a database for WordPress using three easy ways:

  • cPanel
  • PHPMyAdmin
  • MySQL

How to Create a Database for WordPress Using cPanel?

  1. Login to your hosting cpanel page.
  2. Navigate to the Databases section.
  3. Click on “MySQL Database Wizard” button.
  4. Type your database name and username.
  5. Assign privileges to the user.
  6. Add the database information to the WordPress config file.

How to Use MySQL Database Wizard in cPanel?

Firstly, you can make use of the cPanel MySQL Database Wizard. To use the hosting cPanel’s features, you should log in using the username and password provided by your hosting agency. Valid credentials will take you to a MySQL Database Wizard. Here, you will come across a Database section. Conversely, click on the MySQL Database Wizard icon.

How to use MySQL Database Wizard

Give the database a name and click “Next”. By default, the database name will be pre-appended with your hosting account ID! This will create a database.

How to create database in cpanel

Now, you should assign users to your database. Each user must have a name and password. Make sure the password is long, strong, and unique. Very strong passwords will make the database much more secure and safer. Also, bear in mind that the passwords should be remembered! This will create database users.

create database username

The cPanel will let you include as many database users as required. Meanwhile, you should assign privileges to the users. There are thirteen different types of privileges for users (select, create, insert, alter, update, drop, delete, lock, index, references, temporary tables, routines and execute). This will add privileged users to your database. Once the database is created and users are added, you are 90% done.

assign privileges to the database user

finish database creation in cpanel

How to Add Database Information to wp-config.php File

In order to complete the creation of the database for WordPress installation using cPanel, you should edit the config file. This is where four pieces of information can be configured. You can configure the DB_Name, DB_USER, DB_Password, and DB_Host. Generally, DB_Host is defaulted to “localhost” in all cPanel hosts.

How to Add Database Information to wp-config.php File

How to Create a Database for WordPress Using PHPMyAdmin?

Over the past few years, PHPMyAdmin has become an amazing, open-source database for web-based clients. It is much more effective and efficient than conventional database tools like MySQL. If you are handling WordPress administration for the first time, this article will lend you a hand of help. Here is a comprehensive step-by-step guide on how to create your first database for WordPress using PHPMyAdmin.

How to Create a Database for WordPress Using PHPMyAdmin

Preparing Your Site

Before you create databases for WordPress using PHPMyAdmin, here are four important precautions to be followed:

  1. Try to use strong, lengthy passwords with at least 25 characters in the root password.
  2. Create different MySQL accounts with varying privileges. Never stick onto a single WordPress account or password.
  3. Use PMA to alter/change the default URL.
  4. Pull together a reliable Web Authentication mechanism for your PMA site.

It is quite interesting to note that there are several ways to manipulate your WordPress database using PMA. This clearly means that you can break your website, without knowing what exactly is happening. Also, it would be unwise to make use of database scripts without knowing their real purpose. As mentioned previously, PMA is a powerful venture that should be used very carefully.

How to Create a Database Using the Command Line in PHPMyAdmin

With the help of PHPMyAdmin, you can create databases through command line queries and comprehensive visual interfaces. All that you should do is navigate to the SQL tab and paste the following instructions:

Create database db_name;
Grant all privileges on db_name.* TO db_username "@" localhost;
Flush privileges

Consequently, click “Go” to create a new database for WordPress installation using PHPMyAdmin.

Create database using PHPMyAdmin wizard

Create Database Using the Command Line in PHPMyAdmin

Using Visual Interfaces for Quick Databases

The visual interfaces will let you create databases in a few split seconds. These interfaces are straightforward and comprehensive. In fact, you can create users, change privileges and assign users to your database. Common privileges include create, event, trigger, alter, drop, index, execute, show view, create view, process, grant, lock tables, references, shut down, super, select, file, update and insert.

Advanced Steps to be followed While using PHPMyAdmin

While you create a database for WordPress installation using PHPMyAdmin, it would be wise to take frequent backups. Backups will help you restore a damaged WordPress website as quickly as possible. The standard PMA interface comprises of an “Export” option that will help you take immediate backups. Additionally, you can run manual queries using PHPMyAdmin.

How to Create Database for WordPress Using the MySQL Client?

The WordPress software has evolved to be a powerful publishing system that makes use of powerful databases like MySQL and PHP. It is an efficient platform that will let you design top-notch websites with the right kind of dynamic content.

If you are amongst those who have very little skill with coding, WordPress will lend you a hand of help. In simpler terms, your comments, blogs, and posts are stored in a hefty MySQL database. Every time a visitor enters your site, a request is sent to the web server. The requests are sent and received using PHP programming languages.

With all this being said, how will you create a database for WordPress using the MySQL client?

How to Create a Database Using SSH and MySQL Client?

According to experienced web developers, “SSH” is one of the easiest ways of designing databases. It will help you create MySQL databases and assign users in a few split seconds. Here is a simple code snippet to create databases for WordPress installation using the MySQL Client.

  1. Login to your server using SSH as root.
  2. Log into MySQL as root.
  3. Create a new database user.
  4. Log out of MySQL using “\q” command.
  5. Login again to the MySQL using the new database user you have just created.
  6. Create the database.
mysql -u root
GRANT ALL PRIVILEGES ON *.* TO 'db_username'@'localhost' IDENTIFIED BY 'password_here';
mysql -u db_username -p

Create a Database Using SSH

Command Line Basic Definitions

By default, when you create a database for WordPress Installation using the MySQL Client, the root would be the administrative user. At all times, it would be safe and wise to choose a “mortal” account to serve as the administrator. This will reduce the rate at which the “root” is exploited by your website. On the other hand, the username depends on the MySQL Administrator. According to skilled web developers, “blog” alias “WordPress” is an idealistic name for the database. These are wonderful values because the whole world understands them.

Generally, “hostname” is localhost in MySQL Client. If you are unsure of your system’s hostname, you should verify with the system administrator. In case you are the admin, use a non-root account to handle your database.

Last but certainly not least, the database should have a complicated password that is difficult to guess.


Regardless of what you are trying to achieve when you create a database for WordPress, you can accomplish tasks in less than ten to five minutes. This can be attributed to the name and fame of WordPress amongst novice web developers.



Most Popular

Recent Comments