WordPress.org

Ready to get started?Download WordPress

Forums

Reuse post ID (3 posts)

  1. jvchamary
    Member
    Posted 6 years ago #

    I would like to use WordPress to power a collaborative weblog. The ability to submit a post should be open to anyone who's registered, so I've set the default role for new users to 'contributor'. No problems there!

    Importantly however, I'd like to keep the permalinks as short as possible, circumventing the need for URL-shortening services (e.g. tinyurl.com). Using the post ID is probably the best way to do this, i.e. wordpress.org/category_name/post_ID

    WordPress needs to give each post a unique ID to distinguish between entries in the MySQL database, but it doesn't reuse an ID after post deletion.

    From a permalink perspective, this is understandable if a post has already been published (i.e. to prevent a sort of 'bait-and-switch'), but not when the deleted 'post' was actually a draft, or had been rejected by a moderator after 'submit for review' (the same applies to comments, but I don't care so much about those).

    Is it possible to (automatically) reassign or reallocate a post ID after deletion?

  2. Janko
    Member
    Posted 6 years ago #

    Yeah, that would be great... +1

  3. jvchamary
    Member
    Posted 6 years ago #

    Sorry, I didn't search thoroughly enough!
    http://wordpress.org/support/topic/118279
    http://wordpress.org/support/topic/145518

    So, unfortunately, the ID is set to auto increment in mySQL (not WordPress) for any (saved) post, regardless of whether it has been published.

    According to the latter link, there exists a 'temp_ID' key. Is there any way to keep a post set to temp_ID unless it is actually published (after which it would be 'promoted' to a proper ID)?

    It seems silly that users are somehow able to control the permalink content.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic