WordPress.org

Ready to get started?Download WordPress

Forums

Post ID increases from uploading IMAGES (2 posts)

  1. Aleczan
    Member
    Posted 8 years ago #

    Hi, I did a search on Google by the adviced method (using keyword site:wordpress.org/support/ + post ID. Many links showed up and I opened several of them, however, none stated any solution to the issue of POST ID being increased beyond actual post number.

    In most of the threads, people mentioned their POST ID in WP blog increased and never came back to be next to the last entry's ID. They mostly said it was because they had tested by adding entries and then deleted them.

    I too, had the same problem. At first I thought Editing and Saving my posts too many times made my ID jump but it turned out it's not.

    Most of the people who discussed in those threads said it was cause by the MYSQL itself, not the WordPress program.

    In on of those search results, someone said we should add a command "ALTER TABLE tablename AUTO_INCREMENT = 1;" in MYSQL.

    SO I told my MYSQL admin this and asked him to do that for me. He siad it's auto increment was set to be 1 by default. He also said that the number will increase only when new things is inserted into the database table or something. Editing shouldn't increase the ID number. He tested for me and said his ID didn't increase.

    We finally found out (by changind the URL of post edit page to jump into the skipped post ID's page) that what's occupying skipped ID was actually information I input when I uploaded pictures by using WP's internal upload system.

    I wonder if anyone else is experiencing this issue? Or is it because I did something wrong?

    At first when I tried to upload a pic, the system said it failed to create a folder because of the permission problem. So I created the folder /uploads/ for it and set permission to 777. AFterwards, it always upload pics successfully for me, as well as creating thumbnails for every pic.

    Did I set something wrong?
    Is there any way to solve the post ID problem that's caused by uploading pictures?

  2. moshu
    Member
    Posted 8 years ago #

    There is nothing to "fix" or "solve". In WP 2.x when an image is uploaded there will be a "post" created in the database with the status "attachment". This attachment will be used when you pick in the upload process the "Linked to a Page" option.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags