Title: Posts still in database
Last modified: August 21, 2016

---

# Posts still in database

 *  Resolved [holgerhubbs](https://wordpress.org/support/users/holgerhubbs/)
 * (@holgerhubbs)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/posts-still-in-database/)
 * This bug caused quite some confusion.
    In general, what determines if posts are
   being shown in the WP Admin POST list?
 * [http://wordpress.org/plugins/frontier-post/](http://wordpress.org/plugins/frontier-post/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [finnj](https://wordpress.org/support/users/finnj/)
 * (@finnj)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/posts-still-in-database/#post-4009699)
 * Hi,
 * I am not sure, but I expect that only valid posts with a known (valid) status
   are shown.
 * More info: [Codex](http://codex.wordpress.org/Post_Status)
 * If I execute the following query in my test DB
 * `SELECT post_status, count(*) FROM wpt_posts GROUP BY post_status`
 * I get this result
 * post_status count(*)
    afventergennemlsning 1 auto-draft 8 draft 4 inherit 177
   pending 8 publish 83 trash 1 udgivet 3
 * afventergennemlsning is the Danish translation of pending, and udgivet is the
   Danish translation of publish – None of these 4 posts are shown in the admin 
   panel
 *  Thread Starter [holgerhubbs](https://wordpress.org/support/users/holgerhubbs/)
 * (@holgerhubbs)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/posts-still-in-database/#post-4009701)
 * Hmmm…
    How to call those posts? Are you aware of a plugin to fix this issue? 
   Thank you
 *  Plugin Author [finnj](https://wordpress.org/support/users/finnj/)
 * (@finnj)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/posts-still-in-database/#post-4009759)
 * Hi,
 * I have uploaded a fix to the Development version which you can download here:
   [Development version](http://downloads.wordpress.org/plugin/frontier-post.zip)
 * * Install the development version (has version number 1.6.0)
    * Create a new 
   page (you could name it status fix), and insert shortcode [frontier-status-fix]*
   Publish the page, and press View page. * Then you will see a list of posts with
   wrong status, and a link so you can edit the posts from Frontier, and set a valid
   status
 * I suggest that you save the post with status Draft, and then delete it from the
   admin interface if needed.
 *  Plugin Author [finnj](https://wordpress.org/support/users/finnj/)
 * (@finnj)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/posts-still-in-database/#post-4009763)
 * A bit more info on the fix:
    * It a copy of the list showing My Posts with a 
   modified query showing posts with non valid post_status * It can only be executed
   by an administrator * In the list there is a link so you can edit the post in
   front end (and thereby change the status) * It does not change anything in the
   background, you need to edit the post.
 * I believe it is a secure way of doing it.
 * The modified quesry:
 *     ```
       SELECT *
        FROM $wpdb->posts
        WHERE $wpdb->posts.post_status NOT IN ('auto-draft', 'draft', 'future', 'inherit','pending', 'publish', 'trash')"
       ```
   
 * As an alternative you can change the status manually in myphpadmin (MySQL tool
   from your provider). The SQL to use to list the posts
 *     ```
       SELECT *
        FROM wp_posts
        WHERE wp_posts.post_status NOT IN ('auto-draft', 'draft', 'future', 'inherit','pending', 'publish', 'trash')"
       ```
   
 * You must replace “wp_” with the appropriate prefix (can be found in wp-config.
   php)
 *     ```
       $table_prefix  = 'wp_';
       ```
   
 *  Thread Starter [holgerhubbs](https://wordpress.org/support/users/holgerhubbs/)
 * (@holgerhubbs)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/posts-still-in-database/#post-4009801)
 * Thank you 😉
    Maybe to say “GREAT! No posts with wrong status”.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Posts still in database’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/frontier-post_c8b8b0.svg)
 * [Frontier Post](https://wordpress.org/plugins/frontier-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/frontier-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/frontier-post/)
 * [Active Topics](https://wordpress.org/support/plugin/frontier-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/frontier-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/frontier-post/reviews/)

## Tags

 * [orphan](https://wordpress.org/support/topic-tag/orphan/)

 * 5 replies
 * 2 participants
 * Last reply from: [holgerhubbs](https://wordpress.org/support/users/holgerhubbs/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/posts-still-in-database/#post-4009801)
 * Status: resolved