There is no need to explain why you can’t find your WordPress database name, we are all started as beginners and no one was born with WordPress knowledge. Today, I’ll show you in a step by step tutorial, how to find the WordPress database name, and even, how to change its name if you have a new installation or whatever.
Just make sure that you have a backup, so you can restore your website or blog if you make a mistake. The first thing to know is that every WordPress website needs to be connected to its own database that store the data, such as, the posts, the meta information, the plugins settings, and much more.
In other words, you should have the right database for the right website, and not mix them if you have multiple blogs. If you need to import your old database if you’ve just migrated, you can read, how to import the WordPress database using phpMyAdmin.
Now, let start searching for your database name in cPanel file manager, login to cPanel, and then click the “File Manager” icon is the following screenshot example.
Now, you will get the file manager page, where your blog and WordPress files and directories. What you need is a single file called “wp-config.php” that connect WordPress to its own database.
The file will be in the blog root directory where you can also find the folders “wp-admin“, “wp-content” and “wp-includes”. Just scroll down below these directories, and you will find the “wp-config.php” file as the next example.
Now, that you have the file you need, select it and click the “Edit” button in the top area of the page as the next example.
Then, you get the file content with lots of codes and text, forget that and focus on a single line called
/** MySQL database username */
Just after that line you will see the database name that you’re looking for from the beginning.
Keep your details in a safe place, including the database, the login details, and whatever needed to access your site. This information should be saved safely to avoid hacks and attacks.
If you need to change that name, enter the new one of the new database that you want, with your username, and password associated with it. Then, save the changes by clicking the” Save Changes” button at the top right area of the page, and it’s done.
If you have issues to access your file manager, you can use any FTP client software like Filezilla and browse your blog directories, exactly as the above examples. Find the file and open it as in your local machine, but for the distant server.
If you need more information about that, you can read How to use Filezilla to edit WordPress files. This tutorial will help, especially, those who wants to move a WordPress database to a new server and who needs to understand things from the beginning to avoid mistakes later. So, they can associate the correct database to the correct blog and make things works properly.
Please make sure to make a backup of your blog and all the files, you will need them if problems happen for any reason. You can’t guarantee that any server will keep your blog files safe. So, upload your backup to Google drive, Dropbox and keep a local copy for better security. Then, make daily backups if you’re posting daily and you’re an active blogger.