I noticed the MYSQL table wp_statpress was full of records even though i had disabled the plugin quite some time ago. To fix this problem i re-enabled the plugin; changed the options to reduce the items it collects by default and how long it keeps them. I then did an “update statpress” and it drastically cleaned up the table and deleted the old records. Later, using phpmyadmin i optimized the table.
If you delete posts in WordPress that were once indexed by Google or bookmarked by one of your visitors, if they re-visit the link they’ll get your 404 error page. The code below simply will re-direct them to your homepage. Just copy the code to a file and rename it to 404.php. In my WordPress installation, i just replaced the existing 404.php file in wp-content/themes/themename/ with the code below.