Wrong permalink structure

Q: Date/Time this occurred (Provide your time zone also)
A: 5/28/2025 9:30 AM CET

Q: DevKinsta Version
A: 2.13.4

Q: OS Version
A: Windows 10

Q: Docker Desktop Version
A: 4.29.0

Q: Were any error codes or messages observed? If so, what were they?
A: No

Q: Detailed Description of the Problem
A: So I created environment on Dev Kinsta from staging domain on hosting and upon running the server on Docker permalink structure is not properly working. On staging domain everything is working fine but on dev kinsta environment it isn’t. Issue is that posts URLs on dev kinsta environment are formatted with “/?p=21217” on end of it while on staging it’s post names… I already checked the Settings and Permalink structure there and both are set to Post names it’s just that on dev kinsta environment it’s not working as it should for some reason.

Hello @mesha :waving_hand:

Welcome to Kinsta Community!

Just to check, did you try just resaving the permalink structure without making a change (from wp-admin)?

If that didn’t help, can you try changing it to another structure, then back to post?

If that doesn’t help either, please provide me with the main.log of DevKinsta (here’s how to get it).

Kind regards :waving_hand:

Hi Vladimir, thanks for the reply…

Yea I have tried to change to another structure, after clicking save changes page reloads and permalink structure is still set to “post name” even know I have set change to “day and name” seems like changes are not applying at all…

Here are log files from DevKinsta
konsumentmagasinetser_access.log [redacted]
konsumentmagasinetser_error.log|attachment [redacted]

These two are only ones related to the site, there are others related to php versions but it allows me to upload only two links since I’m a new user. Also there’s no main.log

Thanks for writing back :slight_smile:

I’m surprised that there’s no main.log, there should be one regardless.

If I understood correctly, this is happening on your site on DevKinsta so the main.log should exist.

In any case, here’s a couple of things to try:

  1. Try to access Adminer (from DevKinsta) and check in _options table what permalink structure is set. The adminer is returning errors so it might be a bit difficult to check but it should be there.

If this shows correctly set, then try flushing permalinks by using wp rewrite flush

Here’s how to access command line in DevKinsta: WP-CLI - Kinsta®

If that all fails, try disabling plugins, changing theme and if that doesn’t work, try pulling the site again from live or staging Kinsta site.

Just went to Adminer and found that permalink structure is set correctly in wp_options but there are all sorts of issues and errors showing…

Tried disabling plugins and whole site went down and got critical error when trying to access it, pulling the site from live domain right now and will let you know if problem goes away… Anyways, hvala i za ovo :smiley:

Pulled site from live domain last night and just checked still having same problem with permalinks. I even uninstalled docker and dev kinsta did everything from scratch but no luck seems like.

Zdravo @mesha !

With your permission, I can try downloading the site and installing it on my DevKinsta to see if I can replicate the issue.

Is that OK?

Sure go ahead, let me know if you find anything :slight_smile:

Will do :+1:

To set the expectations, I might need 1-2 hours to install and inspect everything, but you should get a notification when I reply. :folded_hands:

Kind regards!

Sounds good, thanks Vladimir.

Hello :waving_hand:

It’s a big site so it took me a bit to set it up.

Shows normal URLs for me but I’ve been testing on Mac, I might need more time to test on Windows. I do appreciate your patience :folded_hands:

Try navigating to Technologi->Artiklen and click on Router article for example… Those articles are pulled from CompaReview custom post type, they are working fine on live domain but for some reason on staging they don’t…

They are working fine on Mac :+1:

If you check the bottom left corner you’ll see a proper URL not ?p= query. And I can open the article fine and it shows correct URL.

I still haven’t had a chance to test on Windows though. Thank you for your patience :folded_hands:

Yea it’s showing me the same, even on post edit page URL is correct, but when visited it redirect to the numbered one

Hello again :wave:
I just wanted to let you know - We might need extra time to be able to check this thoroughly.

It might be a while before me or my colleagues get back to you. We hope to be able to check this and provide some guidance by tomorrow morning if not sooner. I hope we might be able to do it sooner, but I’m trying to set the correct expectations here.

Kind regards :waving_hand:

I understand. Any luck?

Hello @mesha :waving_hand:

I’m actively working on this now and I’ll update you once I have any news.

Thanks for waiting.

Despite my best efforts I wasn’t able to replicate this on Windows either.

But what I see different between your and mine backend URL is that you have port for some reason included in URL:

image

I don’t have that on neither Windows machine nor Mac.

Can you please check if port is included here in Settings:

If not, please go to Docker and check if you’re using WSL2 (I am), Docker → Settings → General.

Looking forward to hearing from you.

Checked the settings and port is included in my URL

Also on Docker WSL 2 is enabled

What happens when you visit that URL, does it show article or 404 page? Because that’s where my problem is, 404 is shown on all posts no matter the post type, whether it be post or something from compareview

Hi @mesha! Thank you for your reply.

Regarding the WordPress and site URLs, if you remove the port number does that change the behavior of the permalinks?

Also, to clarify did you import the site into DevKinsta using the “Import from Kinsta” function? If so, would it be possible to please create a downloadable backup of the site on MyKinsta, and download the zip archive? From there, you can select to create a custom site in DevKinsta, and choose the “Import backup” option to import the site using that downloaded archive.

Below, you may find a link to our help article that goes into details about how to create a site using a backup archive:

After the site has been created using the archive please check if it is functioning normally, or if the same issue persists.

Please let us know how this goes! If you have any questions please don’t hesitate to reply. We are standing by to help!

Best regards