0

I need help with post ids in WordPress. My post IDS went wrong, there is a big prefix before the post ID number. There is a always prefix 1000000 for every new post type (page,woocommerce product, new order, etc..) How can I fix that and delete this prefix ? I dont know how it got there, I tried to uninstall all plugins but always the same. Bellow you can see my problem on screen enter image description here

5
  • Did you check in your database to see if you actually do have millions of posts? If not, what is the issue with the large ID - does it cause any problem? Perhaps this is just a UI issue in the plugin you are using - try to disable all plugins and theme to see when it stops..
    – Q Studio
    Jan 12 at 19:33
  • SamM Foolt, so, when posts are created, whether they're WooCommerce Orders, Posts, Pages, etc, their ID numbers are auto-incremented. My guess is that at some point in time there was a plugin that allowed you to start your 'Invoice' or 'Order' numbers and there was a prefix added. Once that fired the first time, the entries after it simply followed the auto-increment pattern and just +1 every time something is created. Even if you disabled or deleted the plugin that got this started, you'd still have these numbers in the DB as the IDs. Jan 12 at 19:36
  • Do me a quick favor though, click on one of your orders and either as a comment or as an update to your answer paste the URL, you can delete your domain if you want... I'd like to see the part after the .com/. Particularly this part: /wp-admin/post.php?post=7641&action=edit Let's see what the number is in the URL. Jan 12 at 19:38
  • Why is this a problem? post IDs are just numbers auto-incremented by the database as rows are added. They have haps and aren't contiguous. If you create 1million posts then delete them all, the next post ID is 1,000,001, not 1. This isn't a bug, it's how it's meant to work. It isn't a prefix
    – Tom J Nowell
    Jan 12 at 19:44
  • I think I found a problem, few days ago I created a test CSV import of products and i set a product number 10000etc and since then all new post, pages, orders have that ID... it's just visually problem for me, because on website were used only about 3200 post ids and now I jumped right into 1000003250 for example and IDs between these numbers are unused.... so do you think that is some solution how can I fix that ? Or I should continue with IDs 10000.....
    – SamM Foolt
    Jan 12 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.