Home > Article > CMS Tutorial > What is the SQL statement for modifying the ID of an article in WordPress?
What is the SQL statement for modifying the ID of an article in WordPress?
When I was writing an article a few days ago, the ID jumped directly from 146 to 148. The IDs that have been processed by WordPress will be automatically continuous. Let me share with you how to change the article ID to 148. SQL into 147, friends who have similar problems can refer to it
Recommended: "wordpress tutorial"
The article was updated in April, The article ID stayed at 146. I was busy with exams in May and didn’t write a single article. As a result, when I was writing an article a few days ago in June, the ID jumped directly from 146 to 148. I don’t know why. My WordPress has done some processing. The IDs will be automatically consecutive. Open the database and change the article ID of 148 to 147. The complete SQL statement is as follows:
The code is as follows:
update wp_posts set id = 147 where id = 148; update wp_term_relationships set object_id = 147 where object_id = 148; update wp_postmeta set post_id = 147 where post_id = 148; update wp_comments set comment_post_ID = 147 where comment_post_ID = 148;
The above is the detailed content of What is the SQL statement for modifying the ID of an article in WordPress?. For more information, please follow other related articles on the PHP Chinese website!