Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top