What happens if I delete all the rows that represents a post revision from the posts table into WordPress database?

wordpress.stackexchange https://wordpress.stackexchange.com/questions/380929

문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top