404 on existing posts with permalink
-
I got a 404 error when access an existing posts with permalink URL. I checked the post via “All Post” and found that the post existed with the permalink I expected.
I decide to inspect the database, and found that the permalink appears twice in the database. The first one is the link to the page that I deleted before.
So, I went back to the “All Page” menu and permanently remove the (trashed) page. Then, the problem solved.
Here the re-produce step:
1. Create a page (or post) with a specific permalink.
2. Publish the page (or post)
3. Move the page to trash but keep it in the trash (do not empty the trash)
4. Create a post (or page – must be different type to step 1) with the same permalink. WP will allow you to reuse the permalink in the editor
5. Save draft or publish the post (or page)
6. Try accessing that post (or page) via the permalink you will get 404
7. Remove the page (or post) from step 1-3 permanently, you will now able to access the later post (or page).
The topic ‘404 on existing posts with permalink’ is closed to new replies.