admin管理员组文章数量:1429067
I am very new in WordPress development and I have a doubt about the WP database table named posts
I have observe that when I create a new post (into the WP administration panel) are created 2 record into the posts table.
For example, after that I have create a single post titled as DB TEST into the posts table I found these 2 records:
29 1 2014-08-14 20:36:43 2014-08-14 20:36:43 deb test DB TEST publish open open db-test 2014-08-15 20:37:34 2014-08-15 20:37:34 0 http://localhost/wordpressAsper/?p=29 0 post 0
30 1 2014-08-15 20:36:43 2014-08-15 20:36:43 deb test DB TEST inherit open open 29-revision-v1 2014-08-15 20:36:43 2014-08-15 20:36:43 29 http://localhost/wordpressAsper/2014/08/15/29-revi... 0 revision 0
As you can see the 2 records contains the same informations except for the ID (that is univocal) and for the post_type field. In the first record this field have post as value while in the secondo record the valie is inerith
So why when I create a new post I have 2 records and not a single record?
Moreover I noted that, for other posts, I have more the 2 records related to the same post. What exactly means?
I am very new in WordPress development and I have a doubt about the WP database table named posts
I have observe that when I create a new post (into the WP administration panel) are created 2 record into the posts table.
For example, after that I have create a single post titled as DB TEST into the posts table I found these 2 records:
29 1 2014-08-14 20:36:43 2014-08-14 20:36:43 deb test DB TEST publish open open db-test 2014-08-15 20:37:34 2014-08-15 20:37:34 0 http://localhost/wordpressAsper/?p=29 0 post 0
30 1 2014-08-15 20:36:43 2014-08-15 20:36:43 deb test DB TEST inherit open open 29-revision-v1 2014-08-15 20:36:43 2014-08-15 20:36:43 29 http://localhost/wordpressAsper/2014/08/15/29-revi... 0 revision 0
As you can see the 2 records contains the same informations except for the ID (that is univocal) and for the post_type field. In the first record this field have post as value while in the secondo record the valie is inerith
So why when I create a new post I have 2 records and not a single record?
Moreover I noted that, for other posts, I have more the 2 records related to the same post. What exactly means?
Share Improve this question asked Aug 14, 2014 at 20:46 AndreaNobiliAndreaNobili 8786 gold badges21 silver badges36 bronze badges2 Answers
Reset to default 1The second one is revision. It means the changes that you made, but didn't save. Wordpress saves that as revision post. There might be more than one revision post if you make more changes without updating the post.
You don't need to worry about that. It's all in background and won't affect you in any way.
This is many years later and using 5.2, but I just noticed this in prepping to manually migrate content from another platform. Odd that the revision is created at the same exact time as the original post, even though no revision was actually made, but comes simply at the saving of the original post. Noticed this for pages and posts both.
Interestingly, I can delete those "revision" records and no ill affects. The revision record is added back in upon edit and save.
本文标签: phpWhy when I create a new post I found 2 record related to this post into the posts database table
版权声明:本文标题:php - Why when I create a new post I found 2 record related to this post into the posts database table? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745505901a2661243.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论