Title: Emptying a Database Table
Published: March 28, 2023
Last modified: July 7, 2025

---

# Emptying a Database Table

[ Back to top](https://developer.wordpress.org/advanced-administration/server/empty-database/?output_format=md#wp--skip-link--target)

Plugins which generate site statistics for you can rapidly create large amounts 
of data — every visitor causes something to be written to the database. Ordinarily,
this is not a problem, but if your database size is limited by your host it could
be. Also, if you are moving the database for whatever reason, its size will impact
the export and import time. This page will show you how to empty a table, thus resetting
its contents and size to zero. This does not stop the statistics plugins from working
or otherwise damage your database.

[phpMyAdmin](https://developer.wordpress.org/advanced-administration/upgrade/phpmyadmin/)
is the name of the program used to manipulate your database. A good hosting package
will have this included. [Accessing phpMyAdmin](https://developer.wordpress.org/advanced-administration/security/backup/#accessing-phpmyadmin)
offers information on accessing phpMyAdmin under various server control panels.

The procedure outlined in this article has been tried and tested using phpMyAdmin
versions 2.5.3 and 2.5.7 pl1 running on Unix.

**Note:** When making significant changes like this to your database, you should
always create a BACKUP!

See [WordPress Backups](https://developer.wordpress.org/advanced-administration/security/backup/)
and [Backing Up Your Database](https://developer.wordpress.org/advanced-administration/security/backup/database/)
for details.

## The Process

 1. Login to phpMyAdmin on your server.
 2. From the left side bar, select your WordPress database.

![Database selection on the left side bar](https://i0.wp.com/user-images.githubusercontent.
com/90067869/189547314-a8bbe78e-70b6-4533-b14e-196a5db35840.png?ssl=1)

 1. All the tables in the WordPress database will appear.

![Table list](https://i0.wp.com/user-images.githubusercontent.com/90067869/189547350-
944a1066-e81d-404b-8eca-9125161eb5d4.png?ssl=1)

 1. Click “Erase” button of the table you wish to empty. For this example, we will 
    be emptying the “wp_dstats2” table.

**Note:** Your table may well have a different name, check the plugin’s documentation
to find out what it is. DO NOT empty a table that is used by the WordPress core.(
Please see the list under [Database_Description](https://codex.wordpress.org/Database_Description)
for those specific table names.)

![Clicking the “Empty” button](https://i0.wp.com/user-images.githubusercontent.com/
90067869/189547374-2088ff00-3c19-420d-86b7-fbcd0df6ed6d.png?ssl=1)

 1. You will now get a confirmation screen.

![image](https://i0.wp.com/user-images.githubusercontent.com/90067869/189547394-
d6a58758-7a2d-420c-9cd6-33de864b3078.png?ssl=1)

**This is your last chance to check that you have the right table and database selected**—
phpMyAdmin has no UNDO function, so once changes are committed, you are stuck with
them. Unless, of course, you made that suggested back up.

 1. Click “OK” and you will be returned to viewing all the tables in your database 
    with the specified table’s contents emptied.

First published

March 28, 2023

Last updated

July 7, 2025

Edit article

[ Improve it on GitHub: Emptying a Database Table ](https://github.com/WordPress/Advanced-administration-handbook/edit/main/server/empty-database.md)

Changelog

[ See list of changes: Emptying a Database Table ](https://github.com/WordPress/Advanced-administration-handbook/commits/main/server/empty-database.md)

[  Previous: Configuring Wildcard Subdomains](https://developer.wordpress.org/advanced-administration/server/subdomains-wildcard/)

[  Next: Web servers](https://developer.wordpress.org/advanced-administration/server/web-server/)