WordPress: Emptying a Database Table (Updated)

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 is the name of the program used to manipulate your database. A good hosting package will have this included. 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.

1. Login to phpMyAdmin on your server.

2. From the main login screen, select “Databases.”

3. Select your WordPress database.
4. All the tables in the WordPress database will appear.

5. Check mark the box to the left of the table you wish to empty. (Image #4) 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. 


6. From the drop-down menu, highlight and click the “Empty” option.

7. You will now get a confirmation screen. (Image #5)

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.


8. Click “Yes” and you will be returned to viewing all the tables in your database with the specified table’s contents emptied. (Image #6)


That’s it! You’re done!

Some information Provided by WordPress.org

Looking for quality WordPress Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , | Posted under WordPress | RSS 2.0

Author Spotlight

TJ Marsh

My name is Tj Marsh. I spend about 16 hours a day on the internet. Running my company and helping out here at Arvixe. I live in the good ole Arizona where it gets ridiculously hot. I love WordPress and a lot of other open source software along with coding.

Leave a Reply

Your email address will not be published. Required fields are marked *