WordPress Rewrites
Shenanigans in a self-managed server running WordPress.
Good advice gone bad
As part of my refresh of my blogging website, I was reading some advice about working with WordPress. One of the main pieces of advice I discovered in multiple places (like this article and this one) was about permalink format.
I read them fairly thoroughly, thought through the issues and decided. I have just rebooted my website. I like the look of the post-name permalink structure for improving the ease of sharing and discovery. I don’t have any current posts that I care about redirecting to.
So I went ahead and made the change, as well as updating my theme to something less standard. Some last minute viewing of my changes then involved a click or two on some of my internal links like Read more.. and Next/Previous, only to get a 404 response.
Was it crap advice
This was my first thought. Have I done something wrong or have I just been misled? I went back to the original articles and reading them again verified that yes, it should just work (no need for 301 redirects for me).
OK, I thought. Who else has come across this issue before? A quick search of StackOverflow came across this question – but this was a coding issue and I was pretty sure mine was an administration/setup problem.
When in doubt go to the source
Here is where I got smart for once (or maybe just accidentally hit on the right link from a smart search – but whatever works). However, it happened I ended up at the right part of the WordPress Codex on the requirements for pretty permalinks.
A short while later I was vimming through my apache configuration files adding FileInfo
directives and linking available rewrite mods to my enabled folder.
A final restart of the apache service and I was in pretty permalink paradise. Thank Matt Mullenweg for good documentation.
Leave a Reply