In the early days of my using WordPress, I set the permalinks setting (the URL format style) to Numeric. They looked like http://ezrasf.com/wplog/archives/3. On 2008-SEP-27 I changed the permalinks setting to the Day and Name. According to my broken links post each time WP autosaved a draft it incremented the number so the names were no longer sequential. The gaps annoyed me. The new setting hid those gaps. (No, I do not have OCD.) However, it meant
- all those links in posts to old permalinks no longer worked and
- anyone incoming from search engines hit permalinks who no longer worked.
The search engine problem worked itself out without any effort on my part. They recognized the 404 HTTP error code, dropped the bad page from the index on the next crawl. They also picked up the new posts.
I occasionally spent some time working on fixing broken links. However, the process of determining where the link should go took so much effort I rarely fixed more than a few links at a time. So I did not make the progress I would have liked.
Then I discovered the Broken Link Checker plugin for WordPress last weekend. It has been sending me notices about all my broken links. In desiring to shut it up, I had to spend time trying to fix those Numeric permalinks again. I noticed the format of a link in “Get Shortlink” buttons when I edit a post is the same as the Default permalink which look like http://ezrasf.com/wplog/?p=3. It seemed logical I could just replace “archives/” with “?p=” and fix the internal links. Sure enough, it worked. So I’ve cleared up the remaining internal broken links much more easily than I ever expected. It could only be easier if the broken link checker automatically did it.
The WordPress Codex says,
Find a post’s ID number and type the following (with your information) in your browser and you should be redirected to your post:
http://yourdomain.example.com/post/(the ID #)
Well, no matter what id number I use here, they go to the same post on 9/12. Weird. This would have been an even easier fix as I could double clicking on archives does not get the slash. Maybe it means I need something in the .htaccess to make it work correctly?
Meh. I am glad to have an easy solution. Annoyed it seems undocumented. Hope this helps someone else who has the same problem.
Leave a Reply