最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin development - What happens if I delete all the rows that represents a post revision from the posts table into WordPress d

programmeradmin0浏览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?

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?

Share Improve this question asked Aug 15, 2014 at 15:20 AndreaNobiliAndreaNobili 8786 gold badges21 silver badges36 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 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.

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/plugins/wp-optimize/ to do that.

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

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论