WordPress.org

Ready to get started?Download WordPress

Forums

Question about POST ID (10 posts)

  1. evo252
    Member
    Posted 4 years ago #

    Hello,

    I have 1978 posts in my wordpress blog, and posts ID are up to 11000 (I've choosen to put post ID in URL posts).
    Why my post ID are such big ? Is there a way to have Post ID up to my number of posts and not too big ?

    Sorry for my bad english, I'm from france :/

  2. MichaelH
    Member
    Posted 4 years ago #

    The wp_posts table is shared -- it has posts/pages/attachments/revisions so your post ID could be large.

  3. evo252
    Member
    Posted 4 years ago #

    OK thanks MichaelH ! Is there a way to disable sharing ?

    Or another way would be to add automatical numerical ascending value (different from ID) from 1 to infinite...is it possible ?

  4. MichaelH
    Member
    Posted 4 years ago #

    Can't really stop 'sharing'. You can disable revisions http://wordpress.org/extend/plugins/disable-revisions/

    You could use a custom field but you would probably have to assign the number.

  5. evo252
    Member
    Posted 4 years ago #

    Thank u very very much my dear !

    Please, I have an ultimate question for you... Is there a way (maybe SQL command from PHPMYADMIN ?) to REGENERATE all post ID from the database from 1 to infinite ? It would be nice because I've juste installed "disable revision & autosave" thanks to you, and I want now restart ID post from 0.

    I've seen that :
    http://wordpress.org/support/topic/314206?replies=5
    But I want to restart from ZERO before go on posting...

  6. MichaelH
    Member
    Posted 4 years ago #

    You'd have to do
    1.Tools->Export
    2.Backup your database
    3.DROP your database tables
    4.Reinstall the tables by visiting yourdomain/wp-admin/install.php
    5.Do Tools->Import->WordPress with file from 1.

    But again, if you upload media like a picture for a post, that will take an ID number.

  7. evo252
    Member
    Posted 4 years ago #

    aaahhhhh thanks for all Michael, I've forgotten the problem of ID generated by media upload...

    It's a very big problem for me because we are soo many contributors on our blog, and I have customized permalinks (tags, categories, posts, etc...) which could conflict each other (sorry for my bad english, I do the best to explain), so the POST ID was a good solution for me, but we have too longer ID, for instance :
    http://mydomain.com/11954-my-blog-post/

    Soon IDs will rise up to 100 000................

    So there isn't an automatic solution for this problem ? It's difficult to impose to authors to put manual IDs, because it could generate conflicts too....

  8. MichaelH
    Member
    Posted 4 years ago #

    What about 'Day and name' or 'Month and name' permalinks?

  9. evo252
    Member
    Posted 4 years ago #

    Yes, that's I was thinking at same time !

    I've red that domain.com/ID-my-post/ was better for servor and ressources than others kind of permalinks, and it's more right when there are many many posts... What's ur position ? Is it a problem ? Do you advise me to choose day-name permalink ?

  10. MichaelH
    Member
    Posted 4 years ago #

    From Using Permalinks

    For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text "page slug" as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to start your permalink structure with a numeric field, such as the year or post ID. See wp-testers discussion of this topic.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags