How To Fix Permalinks In Wordpress When All Else Fails

If you're new here, you may want to subscribe to my RSS feed.
Follow me on Twitter for Blog updates, my new software releases, and other announcements.
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.

Share, Bookmark, and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • E-mail this story to a friend!
  • LinkedIn
  • Live
  • Ma.gnolia
  • MySpace
  • NewsVine
  • Pownce
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis
  • Yahoo! Buzz

Tags: , , , ,

This entry is filed under Computers, Free, General, Hacks, Software, Website, Wordpress. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.
Like this post? Subscribe to the Full RSS Feed!

 

12 Responses to “How To Fix Permalinks In Wordpress When All Else Fails”

  1. Rob Says:

    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.

  2. Kev Says:

    Rob, what is it about “the first 3 steps” that you can not do? What happens?

  3. Dan Says:

    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

  4. Kev Says:

    Dan: you’re welcome. I agree with the 2.6.1 idea…

  5. erica Says:

    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

  6. Permalink Problems After Wordpress Upgrade? | Midspot Says:

    [...] How to Fix Permalinks in Wordpress When All Else Fails [...]

  7. joy Says:

    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.

  8. Marc Says:

    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!

  9. Marc Says:

    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

  10. Marc Says:

    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.

  11. Fix Wordpress 2.6 Custom Structure Permalinks Part II | Kevin Worthington Says:

    [...] 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 [...]

  12. To The Moon And Back » Fixing Permalinks in Wordpress 2.6 Says:

    [...] 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 [...]

  • Green Hosting $5.95/mo.

    • Green Hosting
    • Dreamhost Web Hosting
  • Search This Site

  • TwitterCounter

    TwitterCounter for @
  • Twitter Updates

  • Deals


  • Recent Comments

  • Categories

  • Archives

  • Akismet Blocked:

  •