How To Fix Permalinks In Wordpress When All Else Fails
If you're new here, you should use the free sign up form to get notifications of new posts via RSS and follow me on Twitter for Blog updates, my new software releases, tips, tricks, and other tech related news.
Thanks for visiting!
UPDATE:Please see Part II, which includes links to the official Wordpress support forum.
After trying everything from disabling plugins, to re-creating permalinks, to removing my .htaccess file, I still could not restore my permalink custom structure after upgrading Wordpress from version 2.5.1 to 2.6. I then posted a new topic in the forums for help and continued to search for answers.
Finally, using several posts and a hack of my own at the end, I came up with the following procedure which fixed it for me:
1. Upload this file to your wp-includes directory:
Save this link as “rewrite.php” and then upload it to your /wp-includes directory.
2. From the dashboard, set permalinks to “Default” and Save it.
3. From the dashboard, set permalinks to “Custom Structure” of your choice and Save it.
Mine is: /index.php/%year%/%monthnum%/%day%/%postname%/
4. The above fixed it, but I saw some errors at the top of each of my pages pointing to /wp-includes/plugin.php – so I added the following line of code which is a hack to suppress the errors:
error_reporting(0); Put this line at the top, just below the opening <?php tag.
That’s it. Please let me know if you have any problems by leaving a comment below.
Possibly Related posts:
- Fix Wordpress 2.6 Custom Structure Permalinks Part II
- New Server
- I’m Back
- Customizing your 404 error page with Lighttpd
- Free Non-Adobe PDF Reader and PDF Writer for Windows















Kev,
Unfortunately the first 3 steps do not work on my website. Have you got any suggestions of further steps I could take to try and make it work.
Thanks.
Rob, what is it about “the first 3 steps” that you can not do? What happens?
Thanks alot!
I wasn’t happy at all when I found out that my permalinks where broken. They need WP 2.6.1 soon, haha.
-Dan
Dan: you’re welcome. I agree with the 2.6.1 idea…
Funny thing is, I am on apache on a *nix box… and 2.5 I had to use index.php/%postname%/ or it would not work.. now i can’t use it or anything to get permalinks to work. Only the default works. Even using the default theme, no plugins.
Same box, different site – default and with a theme, no plugins it works fine. /%category%/%postname%/
I even copied the .htaccess over – rules, permissions, owner, everything exact same. I cant figure it out
my .htaccess
‘
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
‘
AA Rewrite Rules reports
> Permalink: /%category%/%postname%/
> Writable .htaccess file found
> mod_rewrite found
> Not using pathinfo style index permalinks
> Using mod_rewrite permalinks
[...] How to Fix Permalinks in Wordpress When All Else Fails [...]
I followed your instructions for my client’s blog and it worked! Thank you very much. I’ll make sure to blog about your post so other people will know about it.
Your fix work, but not exactly as you explained.
I uploaded the rewrite.php file to my wp-includes folder, and then reset my custom permalinks structure. It worked fine, except for the two error lines above, which I didn’t like.
So I simply uploaded the original Wordpress 2.6 rewrite.php file, and lo and behold, the two error messages were gone, and the custom permalinks structure still works.
Very strange!
Ok, while my custom permalinks work fine now, it appears my category links and Tag plugin don’t. Fortunately archives still works, so I guess I will have to deal with that until v2.6.1
Here we go, in case you haven’t fixed your problem. The solution is here.
http://wordpress.org/support/topic/189058?replies=1
Simply remove the index.php from your permalink structure. When you do that, everything works fine. If linking from search engines that include “index.php” work fine.
At least for me they do.
[...] you’re new here, you may want to subscribe to my RSS feed.Thanks for visiting!Thanks to Marc’s comment on my last post, fixing Permalinks is easier that I originally thought for Wordpress 2.6. Marc cites this post on [...]
[...] it didn’t work for me. Good thing I found this article “How to Fix Permalinks in Wordpress When All Else Fails”. The process involves [...]