• I was testing the Export & Import functionality and I noticed a pretty big issue, at least for me, my testing site had almost nothing on it. A new post would create a post with a PostID of something around 1200. I do an import from an older site with a lot more posts and the import was successful but then I notice that all my new posts are being created with PostIDs like 11911 and above. Not only did the import attempt to match the PostIDs from the old site but not my testing site creates posts with really large post IDs. I understand this won’t break WP but I don’t see the point in attempting to match the IDs or at least have an option to turn that off. I would rather have the posts important as the current PostIDs than to have my site now skip over 100k ids because one of the imported posts has a really large PostID.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support tonyrobins

    (@tonyrobins)

    Hello @oldesalty

    Thanks for the information. Let us take a look at this.

    All the best,

    Plugin Support tonyrobins

    (@tonyrobins)

    Hi @oldesalty

    Just want to give you this quick update:

    We did some tests and realized that it was not us to set the post IDs, WordPress has its own automatic postid allocation mechanism.

    Here is an examples test for your reference:

    First, we created a test post – Test PostID, the ids assigned by WordPress were 27, 28. Please see screenshots 1 and 2.

    Then we deleted the Test PostID and created TestPostID1. See screenshot3. The post ids became 29 and 30 instead of 27 and 28. See screenshot4. As you can see even if we had deleted the Test PostID, the id 27 and 28 in the database were not deleted correspondingly.

    Then we deleted TestPostID1, also manually deleted the id 27, 28, 29, and 30 in the database. And then created testpost2, you can see that even if there were no id 27, 28, 29, 30 in the database, WordPress did not set these id to TestPostID2, but assigned id 31, 32 to it. See screenshot5.

    So, the postid does not work in the way you expected, the postids in the source site are also not exactly the same as the source site after the import, the ids are assigned according to the WordPress pre-set algorithm.

    If you want to keep the same postids on the target site. It is recommended that you try to use the restore function.

    All the best,

    Thread Starter oldesalty

    (@oldesalty)

    Yes, I fully understand that WP handles the PostID for normal posts but if you are pulling posts over with your import-export function it will attempt to add those posts at the PostID they were on the first site. For example, If the highest PostID I had on a new site was PostID 30 and I go to import posts from another site and those posts has the PostIDs of 4345, 5465, 2343, and 6567 your plugin tries to import them with those same PostIDs. So after attempting to import the posts and trying to create a new post on that site you will notice that the newest post is not 6568. So the import from your tool basically makes WP skip over all the thousands of PostIDs between 30 and 6567 because WP looks for the largest PostID and simply adds a new post on top of that. I am saying that your plugin should probably just drop the posts in and let WP handle the PostIDs instead of trying to match them from the old site to the new one.

    Thread Starter oldesalty

    (@oldesalty)

    I can’t edit my reply but my point is that I don’t want the PostIDs to match the old site. I want them to just get the next PostID in line when they are imported but the plugin is importing them with the PostID that was given to them from the old site. Or at least an option to no import the PostIDs when doing the import.

    Thank you ahead of time for anything you can do. I really like your tool and I can’t wait until you have the option for working with other CPTs but I really can’t have these strange gaps in the PostIDs because of an import.

    Plugin Support tonyrobins

    (@tonyrobins)

    Hi @oldesalty

    Thank you for the update and the information.

    Let us take a look at this and see if we could do something.

    All the best,

    Thread Starter oldesalty

    (@oldesalty)

    Thank you. Anything you can do to resolve this or just make an option where someone can pick to just drop the imported posts in and let WP handle the PostID creation that would be great. I can understand a need to have it try to set the same PostIDs or even overwrite the same PostIDs but there are plenty of cases where I would love to avoid that. For example, I am in the middle of completely redesigning a site from the ground up but we want to keep the content but in its current state this plugin makes the PostIDs go from like the low 200s to 20k+ because the old site had a lot of stuff on it and their old WooCommerce also used up a ton of PostIDs.

    Plugin Support tonyrobins

    (@tonyrobins)

    Hi @oldesalty

    We have referred to the interface that WordPress uses for it’s export and import function to develop the function, not importing postid may cause unnecessary and unexpected bugs or problems after the import. So after discussing it, we decide to continue to use the WordPress recommended practice to ensure the reliability and stability of this function. But we do appreciate your suggestion on this.

    All the best,

    Thread Starter oldesalty

    (@oldesalty)

    Respectfully… you aren’t. Most other import tools will simply import without an ID and let WordPress handling filling in the ID based on whatever the last PostID in the database is. Your plugin using the same PostID for a post on an old site as the PostID on the new site. This isn’t how WordPress functions. This is the point I have been trying to make. Your plugin, as great as it is, it doing a post import while attempting to use the same ID on both systems.

    In the case of a new website where you are simply trying to move stuff over from an old site, this can really screw up the PostIDs in WordPresss. My testing website had a gap of nearly 40k post IDs because your plugin imported posts with the PostID from the old website and now any new posts start with an ID over 40k! There are like 15 posts on the entire site and the PostIDs stopped at around 50ish and then jumped to over 40k!

    Like I said, I have to respectfully disagree and I will have to look at other solutions if you aren’t willing to address this. No other import solution does this that I have found. Only yours. Even WordPress’s import will import posts at the last PostID in the current database so how can you say this is how they recommend you handle it when they themselves don’t even handle it that way. Their import system is trash because it wont move over images and such but at least theirs doesn’t bump my PostIDs up to some insane number on a newly created site. Please please please address this or I will have to go somewhere else.

    Plugin Support tonyrobins

    (@tonyrobins)

    Hi @oldesalty

    Thanks for your feedback and suggestion!

    We have fully considered your suggestion, and decided to expand the option in the near future. We also plan to redesign the import and export tool based on the feedback we have collected. It can take some time.

    All the best,

    Thread Starter oldesalty

    (@oldesalty)

    Thank you! You rock! I assume you don’t have an exact ETA but do you have a general ETA on when this might be added? I have a large project that would really benefit from this but the boss man won’t purchase the full version until we know this function works for our needs. =p

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Huge PostID Jump’ is closed to new replies.