How to Empty or Drop a Database Table in phpMyAdmin
Sometimes you need to clear out a database table — to empty a bloated log table, or remove one left behind by an uninstalled plugin. phpMyAdmin makes this easy, but there is an important distinction: "empty" removes the rows and keeps the table; "drop" deletes the table entirely. Knowing which you want prevents accidents.
Empty vs drop
- Empty (TRUNCATE) — deletes all rows but keeps the table structure. Use this to clear data while keeping the table.
- Drop — deletes the entire table, structure and all. Use this only when you truly want the table gone.
Always back up first
Both actions are permanent. Before touching anything, export the database (or at least the table) so you can restore if you make a mistake. This one habit will save you one day.
Step 1: Open the table in phpMyAdmin
- In cPanel, open phpMyAdmin.
- Select your database on the left, then find the table in the list.
Step 2: Empty or drop it
- To empty: click Empty beside the table, and confirm. The table stays; its rows are cleared.
- To drop: click Drop, and confirm. The table is deleted entirely.
You can select several tables with the checkboxes and apply the action to all at once from the dropdown.
Frequently asked questions
Which should I use to clear a huge log table?
Empty (TRUNCATE) — it removes the accumulated rows but keeps the table so your application keeps working. Dropping it could break the software that expects the table to exist.
I dropped the wrong table. Can I get it back?
Only from a backup. This is exactly why exporting first matters. If you have a recent export or JetBackup, restore from it.
Is it safe to delete tables from an old plugin?
Usually, if the plugin is truly gone and the tables are clearly its own (they often share a name prefix). When unsure, back up and remove them one at a time, checking the site still works after each.
Was this article helpful?