Title: Leftover redirection log data in wp_posts
Last modified: August 22, 2016

---

# Leftover redirection log data in wp_posts

 *  [gephenzie](https://wordpress.org/support/users/gephenzie/)
 * (@gephenzie)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/leftover-redirection-log-data-in-wp_posts/)
 * My wp_posts table is large beyond what the host wants to see. Since there were
   only about 100 posts, I started looking into what else it might be, and it appears
   to be log data leftover from the redirection plugin. I went into the plugin on
   the site and manually deleted everything in it’s logs, but still this data in
   wp_posts persists. I inherited this site, so I’m not sure how it was run in the
   past – is it possible that redirection used to store logs in the wp_posts table
   and then that data was abandoned? Is it possible to select and purge it out? 
   Here’s what I see in wp_posts :
    —select post_status, count(*) from wp_posts 
   GROUP BY post_status post_status count(*) 200ok 42045 301movedpermanently 58 
   302found 114 400badrequest 1 403forbidden 529 404notfound 1324 500internalservererr
   37 502badgateway 417 503serviceunavailabl 366 508 123 auto-draft 1 draft 3628
   error 5920 inherit 41 private 1 publish 154 — and —select post_type, count(*)
   from wp_posts GROUP BY post_type post_type count(*) attachment 41 cybrchmpsthmoption
   16 http 54582 page 53 post 94 wpcf7_contact_form 14 —
 * It looks like at some point in the past, redirection was dumping log entries 
   into the wp_posts table and now the current version is unaware of how to remove
   these log entries. Is this correct? How would I select/remove them?
 * [https://wordpress.org/plugins/redirection/](https://wordpress.org/plugins/redirection/)

Viewing 1 replies (of 1 total)

 *  [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * (@songdogtech)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/leftover-redirection-log-data-in-wp_posts/#post-5508302)
 * I don’t see those post statuses in my database that uses Redirection. What you
   need to do is run a query on one post ID and see what rows are shown; that will
   tell you if there are indeed many copies of that one post with different posts
   statuses.
 * And see if there is a custom post type called “http” and if it is in use. Look
   in the functions.php file of the theme.
 * Whatever you find, you need to duplicate the site in a subfolder or on localhost
   and develop some queries to clean the database rather than risking killing the
   live database.
 * (I recently had to clean 50K+ spam users and dead BuddyPress users from a DB 
   and it took trial and error and eventually 3 separate queries).

Viewing 1 replies (of 1 total)

The topic ‘Leftover redirection log data in wp_posts’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/leftover-redirection-log-data-in-wp_posts/#post-5508302)
 * Status: not resolved