Import From Wordpress Appending Ghost Post IDs to URL

I am currently attempting to import my WordPress website to Ghost. However, when doing so, it appears Ghost is creating a post ID for the posts and then appending that to the end of the URL.

  • Example imported from WordPress Ghost URL:
    https://news.slingersuperspeedway.com/hassler-wins-late-model-season-finale-while-reynolds-is-the-champion-at-slinger-681eefe5812964001be66761/

  • Example Original URL:
    https://slingersuperspeedway.com/2024/09/hassler-wins-late-model-season-finale-while-reynolds-is-the-champion-at-slinger/

  • I am running ghost:5-alpine with Docker Compose

  • I am running mysql version 8.0

  • I only see a few errors appear in the console complain about not being able to import some PDF files. (this is fine)

  • I am simply using the Ghost import tool and importing the xml file that is created by WordPress. If needed I can provide that XML file.

I have ensured that there are not duplicate posts being created. But any troubleshooting steps would be great!

Thanks!

SOLVED

I needed to fix this issue so I could have consistent links as to not break old back links when creating my routes. I was able to do this by spinning up a PHPMyAdmin container on my docker-compose Portainer stack. I attached it to Ghost’s DB and manually ran the following query:

UPDATE ghostdb1.posts
SET slug = LEFT(slug, CHAR_LENGTH(slug) - 25);

This MySQL Query will truncate the last 25 characters from the slug field for all rows in the posts table.

So now any links that looked like this:
https://news.slingersuperspeedway.com/hassler-wins-late-model-season-finale-while-reynolds-is-the-champion-at-slinger-681eefe5812964001be66761/
Now have the correct URL such as:
https://news.slingersuperspeedway.com/hassler-wins-late-model-season-finale-while-reynolds-is-the-champion-at-slinger/