0

I have the following doubt related to the posts table of the WordPress database.

I see that when I create a new post in this table are automatically created 2 new rows.

32  1   2014-08-16 15:07:22 2014-08-16 15:07:22 TEST REVISION   TEST REVISION       inherit open    open        31-revision-v1          2014-08-16 15:07:22 2014-08-16 15:07:22     31  http://localhost/wordpressAsper/2014/08/16/31-revi...   0   revision        0

31  1   2014-08-16 15:07:22 2014-08-16 15:07:22 TEST REVISION   TEST REVISION       publish open    open        test-revision           2014-08-16 15:07:22 2014-08-16 15:07:22     0   http://localhost/wordpressAsper/?p=31   0   post        0

I know that the one having 32 as ID is the post revision while the one having 31 as ID is the published post.

For some reason I need to delete all the posts revision from my databse.

If I delete all the revision of all posts can I have some kind of problem with the post of my blog? Or it still work using only the published post?

2 Answers 2

2

You can also do it this way - plugin free.

Open phpmyadmin, browse over to your wp_posts table and:

SELECT * FROM `wp_posts` WHERE post_type="revision"; to see all the posts, their types and revisions and delete from `wp_posts` WHERE post_type="revision"

Though afraid at first...I did it. And it worked without any impact to the site.

1

If you remove revisions, your blog is going to be identical for the user. Only in the backend, you won't have access anymore to your post history.

You can also use plugins like https://wordpress.org/plugins/wp-optimize/ to do that.

Ref: http://codex.wordpress.org/Post_Types#Revision

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.