# Wrong permalink structure

**URL:** https://community.kinsta.com/t/wrong-permalink-structure/5112
**Category:** Bug Reports
**Created:** [May 28, 2025, 7:55am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112 "2025-05-28T07:55:46Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 28, 2025, 7:55am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/1 "2025-05-28T07:55:46Z")

</div>

**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.

---

<div class="post-metadata">

### Author: ![VladimirM](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vladimirm/32/2786_2.png) [@VladimirM](https://community.kinsta.com/u/VladimirM)
#### Post date: [May 28, 2025, 10:41am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/2 "2025-05-28T10:41:26Z")

</div>

Hello @mesha 👋

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](https://kinsta.com/docs/devkinsta/devkinsta-troubleshooting/error-codes/#viewing-the-application-log-file)).

Kind regards 👋

---

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 28, 2025, 11:31am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/3 "2025-05-28T11:31:16Z")

</div>

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

---

<div class="post-metadata">

### Author: ![VladimirM](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vladimirm/32/2786_2.png) [@VladimirM](https://community.kinsta.com/u/VladimirM)
#### Post date: [May 28, 2025, 12:33pm UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/5 "2025-05-28T12:33:54Z")

</div>

Thanks for writing back 🙂

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.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/9/9f9bfa68b62fbedd6f56d009cf8e876e389ba214.png)

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®](https://kinsta.com/docs/devkinsta/wp-cli/)

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.

---

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 28, 2025, 2:23pm UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/6 "2025-05-28T14:23:13Z")

</div>

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…

 ![Screenshot_3](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/f/f8cd7929d07694ce99c74e5f91ed9bcd50dc9ba9.png)

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 😃

---

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 29, 2025, 7:16am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/7 "2025-05-29T07:16:51Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![VladimirM](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vladimirm/32/2786_2.png) [@VladimirM](https://community.kinsta.com/u/VladimirM)
#### Post date: [May 29, 2025, 7:25am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/8 "2025-05-29T07:25:34Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 29, 2025, 7:27am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/9 "2025-05-29T07:27:36Z")

</div>

Sure go ahead, let me know if you find anything 🙂

---

<div class="post-metadata">

### Author: ![VladimirM](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vladimirm/32/2786_2.png) [@VladimirM](https://community.kinsta.com/u/VladimirM)
#### Post date: [May 29, 2025, 7:29am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/10 "2025-05-29T07:29:09Z")

</div>

Will do 👍

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

Kind regards!

---

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 29, 2025, 7:30am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/11 "2025-05-29T07:30:55Z")

</div>

Sounds good, thanks Vladimir.

---

<div class="post-metadata">

### Author: ![VladimirM](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vladimirm/32/2786_2.png) [@VladimirM](https://community.kinsta.com/u/VladimirM)
#### Post date: [May 29, 2025, 10:08am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/12 "2025-05-29T10:08:25Z")

</div>

Hello 👋

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

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/b/b382cd9df4d816acc6b834119c022abd7350ef65.jpeg)

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 🙏

---

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 29, 2025, 10:50am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/13 "2025-05-29T10:50:50Z")

</div>

![Screenshot_4](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/f/fd6764e6c62c67aebd4fd6dfbf157cf2abdde20e.jpeg)

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…

---

<div class="post-metadata">

### Author: ![VladimirM](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vladimirm/32/2786_2.png) [@VladimirM](https://community.kinsta.com/u/VladimirM)
#### Post date: [May 29, 2025, 12:41pm UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/14 "2025-05-29T12:41:07Z")

</div>

They are working fine on Mac 👍

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/1/11e70c51f7ff17d4aed853246e1570b7f856dd85.jpeg)

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 🙏

---

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 29, 2025, 12:51pm UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/15 "2025-05-29T12:51:50Z")

</div>

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

 ![Screenshot_5](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/0/0f5616a39fc549d9de3afdc30313271fc6721bcc.png)

 ![Screenshot_6](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/9/9aad5380459457c76de1f6c424620ab6bc65a34a.png)

---

<div class="post-metadata">

### Author: ![VladimirM](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vladimirm/32/2786_2.png) [@VladimirM](https://community.kinsta.com/u/VladimirM)
#### Post date: [May 29, 2025, 2:10pm UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/16 "2025-05-29T14:10:30Z")

</div>

Hello again 👋  
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 👋

---

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 30, 2025, 8:31am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/17 "2025-05-30T08:31:46Z")

</div>

I understand. Any luck?

---

<div class="post-metadata">

### Author: ![VladimirM](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vladimirm/32/2786_2.png) [@VladimirM](https://community.kinsta.com/u/VladimirM)
#### Post date: [May 30, 2025, 8:52am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/18 "2025-05-30T08:52:45Z")

</div>

Hello @mesha 👋

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

---

<div class="post-metadata">

### Author: ![VladimirM](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vladimirm/32/2786_2.png) [@VladimirM](https://community.kinsta.com/u/VladimirM)
#### Post date: [May 30, 2025, 2:19pm UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/19 "2025-05-30T14:19:33Z")

</div>

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](https://us1.discourse-cdn.com/flex020/uploads/kinsta/optimized/2X/e/ea4c45723abb13e739130e1df68e3020a2c4803a_2_690x71.png)

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

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

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/4/4f18cf98c30016a3c7b1b4e56cb5efcf6b1552da.png)

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

Looking forward to hearing from you.

---

<div class="post-metadata">

### Author: ![mesha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/mesha/32/4757_2.png) [@mesha](https://community.kinsta.com/u/mesha)
#### Post date: [May 30, 2025, 5:29pm UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/20 "2025-05-30T17:29:16Z")

</div>

Checked the settings and port is included in my URL

 ![Screenshot_7](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/1/12ad1c7ace6449b157026c7d9a0dcf6a550ca116.png)

Also on Docker WSL 2 is enabled

 ![Screenshot_8](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/f/f0d377abd908af1cf10d9a80984094af6eaf8fa1.png)

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

 ![Screenshot_9](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/b/b957dc24bbac44df2f58856f608f0670f694d770.png)

---

<div class="post-metadata">

### Author: ![Andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/andrew/32/2792_2.png) [@Andrew](https://community.kinsta.com/u/Andrew)
#### Post date: [June 1, 2025, 2:04am UTC](https://community.kinsta.com/t/wrong-permalink-structure/5112/21 "2025-06-01T02:04:54Z")

</div>

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:

> **[DevKinsta - Kinsta Integration - Kinsta® Docs](https://kinsta.com/docs/devkinsta/devkinsta-integration/#creating-a-site-from-a-backup-in-devkinsta)**
>
> Find out how you can integrate your MyKinsta sites with DevKinsta.

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

[Next page](https://community.kinsta.com/t/wrong-permalink-structure/5112.md?page=2)
