• Hi, I setup a new blog (having no posts right now). The pemalink structure is https://blog.example.com/postid/postname/. There was a post “Hello World” made by WP, I made another post for testing and then deleted these two posts. Now if I write new post then its postid becomes 3 and permalink becomes https://blog.example.com/3/my-post/.

    I want to reset postid in database to 0, so that if I write a new post it postid starts from 1 (to track no. of posts written over time).

    How this can be done, can it be done using any MySQL command/query in database? (I have installed WP-DBManager plugin).

Viewing 1 replies (of 1 total)
  • Backup important data first (just my disclaimer).

    ALTER TABLE table_name AUTO_INCREMENT = x

    x is the numeric value to use for the next entry if i remember correctly.

    You’d need to make sure the WordPress database is selected first, then run the query, setting the table_name and numeric increment value as appropriate.

Viewing 1 replies (of 1 total)
  • The topic ‘How to reset post-id to 0?’ is closed to new replies.