.png&w=3840&q=75)
Websites & Hosting4 min
How to Audit and Delete Unused MySQL Databases in cPanel
NS
NameSilo Staff8/27/2026
Share
To audit and delete unused MySQL databases in cPanel, cross-reference your active website configuration files (like wp-config.php) to confirm which database name your live site uses. Once confirmed, open MySQL Databases in cPanel, locate the unlinked, obsolete database in the list, and click Delete to reclaim storage space.
How Abandoned Databases Clutter Your Server
Every staging site, abandoned plugin test, or old client project deleted through File Manager alone, without cleaning up its database, leaves an orphaned MySQL database sitting on your server indefinitely. Nothing removes these automatically.
Beyond wasted disk space, abandoned databases from old, unpatched installs represent real attack surface: outdated table structures, leftover admin credentials in old wp_users tables, and forgotten data nobody is securing.
Why It Matters: Storage and Security
Reclaiming storage matters on any hosting plan with a defined quota, but security deserves equal weight. A database tied to a WordPress install you deleted two years ago is still queryable if its credentials leak, still holds whatever data was in it, and contributes zero value while carrying ongoing risk.
Database counts are also capped by plan on shared hosting:
Plan | Max MySQL Databases | Max Websites |
Starter | 1 | 1 |
Premium | 3 | 3 |
Turbo | 10 | 10 |
On Starter specifically, one forgotten database from an old project doesn't just waste space, it completely blocks creating a database for anything new until it's removed.
Routine database hygiene isn't just tidiness. It's closing doors nobody remembers leaving open, and on lower tiers, reclaiming a resource you may have no other way to get more of.
Step 1: Identifying Active Databases
Never delete based on memory or a database name that "sounds old." Before touching anything, confirm what your live site actually uses.
For WordPress, open File Manager, navigate to your site's root folder, and open wp-config.php. Look for this line:
define( 'DB_NAME', 'yourusername_wpdb' );
That exact string is the database your live site depends on. Other platforms follow the same principle, checking configuration.php for Joomla, for example.
If you manage multiple sites on one account, repeat this check for every install before assuming any database is safe to remove. A shared cPanel account can have several active databases alongside genuinely abandoned ones, and names alone rarely make the distinction obvious.
Step 2: Safe Exporting Before Deletion
Deletion in cPanel is permanent. There is no undo, no trash folder, no recovery option once confirmed.
Before deleting anything, even a database you're fairly confident is abandoned, export a .sql backup via phpMyAdmin: select the database, click Export, choose Quick export with SQL format, and save the file somewhere safe. This costs seconds and gives you a recovery path if you were wrong.
Once backed up, return to MySQL Databases, find the database under Current Databases, and click Delete to confirm removal.
Common Mistakes
Deleting a database based on memory instead of checking configuration files: This is the single most damaging mistake possible here. A database name that looks like leftover test data can, in fact, be exactly what a live production site is currently reading from. Always verify against wp-config.php or the equivalent file first, every time.
Leaving orphaned database users behind: Deleting a database doesn't automatically remove its associated MySQL user. Old credentials accumulate over time; check Current Users in MySQL Databases and remove any tied to databases already deleted.
Deleting a shared database instead of dropping specific tables: If multiple sites share one database using different table prefixes, deleting the whole database takes down every site using it. Drop only the specific prefixed tables via phpMyAdmin instead.
What This Means for You
NameSilo Hosting gives you full cPanel and phpMyAdmin access for direct database management. Retiring an old project and starting fresh? Register a new domain to go with it.
Frequently Asked Questions
How do I know which MySQL database my WordPress site is using?
Check the DB_NAME value inside your site's wp-config.php file.
How do I delete a database in cPanel?
MySQL Databases → Current Databases → Delete next to the target database.
Can I restore a deleted MySQL database?
No, unless you exported a backup beforehand. Deletion is permanent.
Where do I find wp-config.php in cPanel?
In File Manager, inside your WordPress site's root installation folder.
Does deleting an unused database free up disk space?
Yes, immediately, reclaiming whatever storage that database occupied.
How do I remove unused database users in cPanel?
MySQL Databases → Current Users → delete any users tied to removed databases.
What is database overhead?
Wasted space from deleted rows that MySQL hasn't yet reclaimed internally.
Does NameSilo hosting limit the number of databases?
Yes: Starter allows 1 MySQL database, Premium allows 3, and Turbo allows 10.
.png&w=2048&q=75)
NameSilo StaffThe NameSilo staff of writers worked together on this post. It was a combination of efforts from our passionate writers that produce content to educate and provide insights for all our readers.
More articleswritten by NameSilo

.png&w=3840&q=75)
.png&w=3840&q=75)
.png&w=3840&q=75)