Migration Issue: Posts are NOT working after migration

Hi everyone.

I am having trouble having my posts displayed after a complete migration.

Allow me to give you some context.

I created a site on my VPS before migrating over to Kinsta using (migrate guru). Staging site on VPS = Display is perfect. No issue.

I moved to Kinsta (staging area again) to give it a run. The posts displayed are not working. E.g. I have a Single Post, with permission and conditions set to Posts/Single Page.

I read that I need to ‘refresh’ the permalinks to ensure that all the rules are correct. Did that a zillion times, even changing the permalink to another structure and putting it back to the ideal one.

Still, it is not working. All my post pages are display 404 error which I am not sure how to fix this.

Can anyone point to me what I should do next to resolve this?

Thank you.

Just some guesses:

are all posts “published”, or for some reason after migration set as “draft”?

Did the migration process maybe change some post_id`s? or is it truely the same database?

Cheers Suat

Hi. They are all published. Should I make them draft instead?

No they need to published.

Only posts return 404 right? For pages it works fine?

What happens if you open a post on the backend (from gutenberg top right corner). What’s the url of that post then?

Hey SuatB.

Thank you for taking the time to respond back.

  1. Only posts return 404 right? >> Yes. Content is made on Gutenberg and sits on a Single Post template.
  2. Pages work fine. >> Yes.
  3. What happens if you open a post on the backend (from gutenberg top right corner). What’s the url of that post then? >> The URL is the staging URL + the correct permalink. It auto goes to 404 error with this seen on the page “Whoops, that page is gone”

Sample link: https://stg-marketinglancers-staging.kinsta.cloud/blog/sales/sample-1/

okey did you change the WordPress Address (URL) and Site Address (URL) under Settings → General?

Maybe you can use something like Better Search Replace plugin to change any database entry with the old url to the new one. But be careful, and have a backup ready!