WordPress.org

Ready to get started?Download WordPress

Forums

Can You Change Older Post ID Values? (2 posts)

  1. MuellerMR
    Member
    Posted 8 years ago #

    So I recently redesigned a blog for a client, and he now wants his permalinks to be Google News friendly (which he says means they must contain at least 4 unique numbers and preferrably end in .html). Changing new posts to this format is easy enough, just by changing the auto increment value in the wp_posts sql table so that the post ID includes 4 numbers and then formatting permalinks, so that much is already figured out.

    The problem is I don't see any easy way to get older post IDs over to this format aside from going in and changing every ID value by hand, and again for the categories. Obviously this is a pain.

    Does anyone know if there is an easier way to do this? Any help or suggestions are appreciated.

  2. manstraw
    Member
    Posted 8 years ago #

    Instead of messing with the database, I would have added the year, month, and day in the perma links along with the post number. Even if you just stuck the year on in front of the post number, like "2006123" for post 123. I consider that safer and easier than editing the tables. Would that work for ya?

    Or even just add 100 in the perma link structure.

    like "/100%post_id%.html" for example. (I haven't tested that)

Topic Closed

This topic has been closed to new replies.

About this Topic