WordPress StatPress plugin with empty table option
Written by Uthfull on September 21, 2008 – 4:32 pmI use the StatPress plugin on this blog installation to gather some basic and live statistics of the visitors to my blog. I also use the WassUp plugin to capture some similar statistics. While both plugins have their own pros and cons, there is one thing that used to bother me about the StatPress plugin.
While there is an option to delete the older records from the table after a certain time, there is no option to empty the entire table of the stats. Why is this option required? Well, certain people like me host their blogs on servers which give a limited amount of database storage. Statistics plugins like WassUp and StatPress tend to accumulate a large amount of data and thereby take up a lot of database space.
WassUp has an option to empty the table whereas StatPress misses this functionality. I had to manually go into phpMyAdmin and empty the table. So, I decided to look into the plugin and try to add this functionality within it so that I could save myself from the hassle of going to a another software to manage the mess. I am no coder. I read through the entire code in statpress.php and made modifications as required.
I present to you, StatPress with empty table option.
As the above screenshot clearly shows, when you click on StatPress tab within your WordPress Dashboard, you will see an extra option called “Empty”. Clicking on it will delete all your stats from within the database and makes StatPress start afresh. However, please note that this action is permanent unless you have a previous backup. Once you click on Empty, it will empty your database without any further prompts or warnings.
DOWNLOAD : StatPress v 1.2.9.2 with Empty table option (79KB).
Those of you not wanting to undergo the exercise of downloading a new ZIP file of a plugin, deactivating the original StatPress 1.2.9.2 and reactivating this plugin may simply copy the entire code from the text file linked below.
DOWNLOAD : statpress.txt
Open the statpress.txt file. Either save it as statpress.php and overwrite the wp-content/plugins/wp-statpress/statpress.php file. Otherwise, from within your WordPress Dashboard, click on Plugins. Navigate to StatPress and click on Edit. Replace the entire text in the textbox on the next page with the text from the statpress.txt file you just downloaded.
Please note that I am in no way responsible to any damage or loss whatsoever the use of this modified plugin may cause to your installation. I am Jack of all trades, master of none. I don’t claim the code and modification is perfect. It is just a basic implementation. Take all precautions before you activate this plugin.
Finally, the development of StatPress seems to have stalled. There is another plugin StatPress Reloaded. Check it out.
Some other posts that might interest you :
- Migrate/move your WordPress blog to a new domain/server : Well since I just finished migrating this blog over to this new domain, I thought I’d just describe how I...
- I Like Wordpress!! : Well its been a breeze installing and configuring this software (wordpress) Its just too good. The themes are nice, the...
- Lock and Hide your Windows XP folder the special folder way : This week I came across an article on Lifehacker providing a way to hide and lock a folder in Windows...
- Fighting Spam : The spam bots have waged a war on my poor blog. Everyday, at least 50 comments are held for moderation...
Tags: database, empty, hack, mysql, plugin, statpress, table, wordpress
Posted in Technology |

October 14th, 2008 at 8:08 am
Hey dude, some sharethis javascript stuff is producing errors on your page, if you find some time check it, may be some file is missing
January 6th, 2009 at 11:21 pm
Thanks ! I searching it.