Skip to content

How to create a database on your server for WordPress website?

Are you looking to create a database on your server? You know every bits and piece of WordPress but one important thing that you need to understand is creating a database.

If you are a beginner, then you can check on this article WordPress for Beginners. I have provided the basics of how you can use WordPress for your site.

Don’t worry creating a database is so easy. Most importantly, you don’t need to create a database manually for your WordPress site. Confused..!! 😉 

In this post, I will tell you how you can create a database for your WordPress site. WordPress uses PHP to store and retrieve data from your database, so whatever data that you add on your WordPress site it is all stored on your database.

In our previous post, I have mentioned how you can install WordPress manually using an FTP server.  Using the wp-config.php file you need to add the database name, username, and password which you will be creating on your server.

You can edit the file using FTP server and upload them using FileZilla

Creating a database

  • First You need to login to cPanel where will find option MySQL database wizard.
  • Second: Once you click on that option you need to add in the database name and create a username and password to access that database.
  • Third: Select all privileges so that the user can modify any changes inside a database.
  • Fourth: After you select all the privileges you need to save changes and your database is ready.

create a database using cPanel

Creating a database is easy once you create your database and you have installed your WordPress manually using FTP server you need to type in the domain name and you will be greeted with Run Installation wizard.

You need to add in the database name with the username and password that you have added while creating a database.

You need to click on Next and add the Site details which will be your WordPress username and password to access your WordPress admin dashboard.

What happens if something goes wrong?

Mistakes happen and most importantly you don’t need to panic as being a beginner you will be having some troubles in the initial period of time.

Most common mistakes that happen when installing the WordPress manually is the name of the database or the username & password is mismatched when you add during the WordPress installation.

The best way to remember to database name is you need to write it down somewhere on your notepad or use the domain name as your database name and also the username and password. 

In this case, there would be no trouble you install WordPress since you use the same name for all the details.

Can I create a database on my localhost?

Yes, you can and creating a database on your localhost server. It is such an easy task as you don’t need to create any username or password. You need to download WAMP or XAMP for your Windows PC. But if you are using MAC you need to download MAMP server for localhost. 

Since you are installing and creating a database on localhost mistakes can happen. You can correct those steps easily by creating the database again and again as there are no limits.

You need to start your local server which could be either the above one. On your browser URL, you need to type in the following localhost/PHPMyAdmin

Once you type the URL and enter you will be accessing the localhost database. Finally, you can easily create the database for your site.

Your database is now created so now you need to install WordPress. The procedure is the same as downloading the wordpress.org files WordPress official website. Once downloaded, you need to upload the files on your site localhost server.

Install WordPress on XAMP or WAMP

If you are using XAMP, then you need to add those files where you XAMP gets installed. You can open My Computer on your PC and install either in C:/ drive or D:/ drive. You need to paste the files inside C:\xamp\httpdocs\

If you are using WAMP then you need to paste the downloaded WordPress files on C:\wamp\www and paste those files.

After you are done with that you need to open your browser and type the URL localhost/folder_name and enter. The WordPress files which you have downloaded will take the path of that folder name which you have on your localhost path. If you have renamed the folder name then the URL should be localhost/wordpress 

database-on-localhost

Again, same process adding the database name and creating the username and password. Since you are using localhost then you can add the username as root and keep the password field blank and click run installation. 

wordpress-install

Now you know how you can install WordPress on localhost. It is always recommended that you learn the basic settings of WordPress. Please check out this post WordPress for Beginners and know the basic settings of WordPress

Bonus: Can I install WordPress automatically without manually creating a database?

Yes, you can. I know many people don’t need to do this headache job of installing WordPress manually from FTP server or cPanel. Furthermore, creating a database manually would be an immense task in hand.

So here I will provide bonus info where you can easily skip all the above process and install WordPress automatically. Once you follow this step you don’t create the database as well. It will also be created by WordPress.

Most of the hosting providers like Bluehost provide the one-click install feature where you can easily install WordPress in minutes.

bluehost-cpanl-dashboard

You need to click on the WordPress software and add the domain name URL and add the username and password for your WordPress admin dashboard and click on the Install button.

Your database will be automatically created without letting you know. Once the installation gets completed, click on the URL and access to the WordPress admin dashboard. Quite Easy isn’t it…

Installing WordPress through the cPanel is easy. Furthermore, the installation wizard will create an install WordPress on its own. In conclusion, you don’t need to go to the above process to install WordPress manually.

Conclusion

I hope you liked this post and get to know about creating a database on your server.

With bonus info on how to install WordPress automatically using your cPanel hosting dashboard. I would request to give this post a thumbs up and also share on your social media.

Please like, share and subscribe. Take care 🙂

Leave a Reply