• halmowlez

    (@halmowlez)


    Is it possible to change the id of a post? I’ve been experimenting with WP as a total novice and found that when a post has been deleted, subsequent post ids continue to go up. For various reasons of presentation I’d like to keep post ids sequential and consecutive. Any advice on where to look to make a change?

    Is there an idiot’s guide to what each of the WP files does and how they fit together?

Viewing 5 replies - 1 through 5 (of 5 total)
  • xerocool

    (@xerocool)

    From my head, The only way would be probaly to go to PHPmyadmin and play with the wp_posts table (I think its wp_posts). Everyone has this problem, and some hate it.

    lawtai

    (@lawtai)

    I don’t know about changing the post id. This might be able to be done in the database, but could screw a few things up. If anything, you could use permalinks, as it would allow you to use the post slug as the name instead of the number.

    As far as a guide, take a look at the codex.

    fuzzy_logic

    (@fuzzy_logic)

    You should keep the IDs as they are because if they change all the time, people will have a hard time linking to your posts.

    Thread Starter halmowlez

    (@halmowlez)

    Thanks all – I think I get that I’d have to edit things in the database, not the WP files.

    I’ve tried just using the post slug as a permalink, but the navigation fails (and it says in the codex that a number should always be included in a permalink).

    The codex has a partial explanation of what all the files are – here’s hoping some expert users can do more work on that!

    lawtai

    (@lawtai)

    Navigation probably failed because your .htaccess file wasn’t set up correctly. If you can hover over the link and see the permalink, but when you click on it get a 404, then you’ll have to make sure you set up the .htaccess file correctly. The codex suggests using a number so that you won’t screw things up if you ever use a post with the same title. Suggested numbers include the date.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘change a post’s id’ is closed to new replies.