Hi. I’m Dre Armeda. I'm a Harley enthusiast, and a Chargers fan. I wear many hats, and love tacos. I'm infatuated with WordPress, web design, and web security. I work at Sucuri Security. I hope to help make the web a safer place!

If Pages Return A 404 After WordPress 3.1 Upgrade

Hi folks, if you haven’t heard already the newly polished version of WordPress was released today (It’s pure ninja magic!). If you haven’t upgraded already, you should. Here is the info on the new version.

I saw a few requests come in this morning for folks having permalink issues after upgrade. Now I am seeing similar issues being discussed on Twitter.

Here’s a quick post which outlines the steps I took to get this remedied for a few folks. If you upgraded, and now your pages or categories are giving you a 404, try the following:

Pages Returning 404′s

  1. Log in to wp-admin and go to permalinks, click save (this should refresh your permalinks). Check to see if this fixes your permalinks. If not, set to default. :)
  2. Disable your plugins to remove them out of the equation.
  3. Log into your server via sFTP/SSH/FTP and find your .htaccess file. It should be located in the root of your WordPress install.
  4. Pull the htaccess file down so that you have a local back up. Once you’ve pulled it down, go ahead and delete it from your server.
  5. Go back to wp-admin and visit your permalinks page. try enabling custom permalinks.
  6. This should remedy the issue and you can go ahead and reenable your plugins.

I also ran into a couple white screens of death, here’s how I got them working:

White Screen After Upgrade

If you run into the white screen of death when trying to log into wp-admin, try renaming your theme, then log in. Once you’re able to log in and update the database, rename the theme back to its original name.

The other thing you can try is uploading a fresh copy of WordPress onto your server. I know, I know, you just updated, why would you do that? Well, some servers are finicky, and some FTP clients don’t always play nice. In one instance today I fixed a white screen by simply re-uploading the /wp-admin directory. Done and done.

These tips worked well on a few troubled sites I encountered today. Hopefully you don’t see any issues, and are enjoying all the new goodness in 3.1.



  1. I had the white screen… I fixed it by uploading the upgrade via ftp (and it took forever). I didn’t try the theme rename trick… could have saved a lot of time ;-)

  2. I am having my hosting company revert me to last night’s back up before I did the upgrade to 3.1 —- I was really glad to see your post and may try it later if I have the courage but honestly I’ve never had this problem with wordpress before – suddenly all of my urls a sea of 404 – . This make me want to move to tumblr.

  3. My website became a horror story. I wasn’t getting 404′s but, instead, all of my post categories when clicked remained on the front page, despite showing the correct url in the address bar. It also jumbled all of my posts as if they belonged to one category on my front page. I disabled all plugins and the issue was not rectified. I had to do what jvasko did and revert to yesterday’s backup. Like him, I am scared to try another upgrade now. This is the first time I’ve ever had an issue with a wordpress upgrade.

  4. Same thing as Adam. Problem is custom links like /%category%/%postname% – those ugly ones work just fine.

  5. I have the same 404 issue. I use /%category%/%postname%/ and i get 404s.

    - I did a clean install of wp with a new database and deleted all plugins.
    - I even tried to use the default wp theme and all of the posts and category links go to 404 pages.
    - I deleted the htaccess file, then set the permalinks back to default, saved the permalinks, then set the permalinks to my custom structure or /%category%/%postname%/ and i still get 404s.

    Is there something wrong with the archive.php page?

    Do you have any other thoughts into what i can do.

  6. I am patient … I don’t panic … but I’m about to shoot myself ! …

  7. upgrade to 3.1 … 1 minute and 30 secondes – perfect (as usual with WP) … :)) looks great as usual
    so I was running – as usual … great job ….
    got to Gmail (not related to the upgrade) and got an alert message from my host (startlogic) …
    warning you have 182.000 DB query / hour you’r over the limit …
    HUH ?

    hunting for plugins (Cache) and Hotlinks
    the 2nd is working (supposedly) but the 1st W3 whatever gave script errors
    I killed it (on both sites) dasboard and ftp …
    I did the same for all the not life saver plugins
    then checked (backend and front) NO Problem … then I noticed that top and bottom links “older posts” was giving a 404 …. hmmmm …
    logged out to turn me into a regular visitor … and BANG …
    I am fighting for hours and hours with an invasive index.php that is creating like a error loop and I can’t log in.

    the trouble with the “older posts” link was the link (and still is) like :
    http://www.eucmh.com/http://www.eucmh.com/page/2 … ?
    I thought that the only place to double the url was the general setting page (site url) (wp url)

    the site is runing but I can’t log in and try to correct that old post link problem
    I can’t neither turn off the plugins … not dashboard …
    any idea

    gunter / belgium


    • That’s really odd and also looks like a redirect issue that may be caused by your htaccess. Have you tried backing it up locally and deleting from server?

      Also, since you can’t reach your admin area, try renaming your plugin folder via sFTP/SSH.

      • hello
        Yes I have removed the htaccess
        I have just downloaded a fresh 3.1 and will try to autoclean it but without control on the plugins …

        • Did you try logging into the server and renaming the plugins folder? That will also disable them. Once you’ve determined if they are causing a problem, you can re-enable them by renaming the folder /plugins.

          • yes I have done this – I will have to reload a fresh 3.1 because there is a change now – (plugins off) all the links are correct but all drive to 404
            I just need to remember what page I don’t have to erase because I am on auto upgrade for years and don’t remember how to manualy …

          • I have reloaded a fresh wp-admin wp-content and root
            I am still fighting with this strange login page and can’t log
            this is so anoying


          • OK I had – in some way to gain control again – if you can’t on HTTP and FTP there is only one way left MySQL … that’s what I did – got to Cpanel picked the right DB then (prefix)options to trap the problem.
            Site url -> http://www.eucmh.com/index.html and changed it inside the DB to http://www.eucmh.com
            I have now again control but — lost all the work on the css stule for the theme and the link “older posts” is again messed up (http://www.eucmh.com/http://www.eucmh.com/page/2) gggrrrr

          • How are things going?

      • just did (-plugin) – we have a permalink problem because the older post link is correct now but I still have this invasive index page

        when I click “log in” it return a login page without theme (like blank) and when I click log
        that’s the 404 url http://www.eucmh.com/index.php/wp-login.php

  8. The update of Simple tags fixed my problems – so permalinks (/%category%/%postname%) works now just fine.

  9. Facebook User says:

    We discovered a strange issue right after we upgraded to 3.1 with index.php being ignored. If we enter URL/index.php it automatically goes to the webserver default index.htm – which has a different function in our environment. Any idea what happened and how we can fix it? – Thanks!

  10. Thank you Dre. This article was a huge help.

  11. I just downloaded and installed WP for the first time last night. I can see all of my pages and posts but it won’t go to my homepage. Keeps 404′ing. Someone on the WP Support Forums sent me here. I cant even find the .htaccess file. I am new to this. I downloaded a plugin that someone said would fix my problem, but have no other plugins installed. Any idea what my problem might be?

  12. I haven’t seen an answer to David’s comment of why there is no .htaccess file in the root folder. I have tried every other fix suggested here but am still getting 404 error when trying to access my posts. I would like to try deleting my .htaccess file, but there is no such file in my install of 3.1

  13. Thanks a lot. I faced this problem only on one of my blogs. The problem was found to be one of the plugins as well as the .htaccess file.

  14. I have done possibly everything that could be done (more than what you have included in the post), but haven’t been able to solve the issue. Only category and tag pages return 404.

    It was unresolved on WP.org forums, wordpress stackexchange and even unreplied on wp-hackers mailing list.

    Here is a link if you want to take a look and can suggest something – http://wordpress.org/support/topic/wordpress-category-gives-404-after-moving-to-a-different-domain?replies=18

  15. I get 404 with index page.
    I took back ups from the database and restored everything but wp-admin is all empty of data.
    The theme interface works fine with ver. 3.1. All other data just seems to be lost.
    I have no clue how to trace this one…

  16. Hi, I run my blog at http://www.BritishPcRepairs.co.uk/blog

    I am using a custom permalink structure like

    Ever since I started using this structure, I have had to use the fix mentioned here

    to make this structure work.

    I just updated to 3.1 and applied the same fix as mentioned on this link. However now all my posts redirect to a URL

    As you can see there is a repitition of /blog in the URL! No matter what I do I can not fix this. I have tried all the fixes you suggested but nothing is working. I would appreciate some help please. Thanks!

  17. Thanks for the step-by-step instructions. Worked like a charm for me!

  18. Thank you! I had a problem with my category pages returning 404′s. But step A and B fixed the problem! Unfortunately I had to remove my “Pagebar2″ plugin for it to completely work.

  19. Hi, I have a problem now and is that I don’t have access to all my sites in word press.
    I can’t get in because I don’t see the applications anymore. Just see the dashboard of the main page with no options.


  20. Hi, I tried all the above but still have problems.

    Mainly my old custom post type entries are no longer editable, they all have just the View button only.

    Please, help.

  21. Am trying to get prettier permalinks. (/%category%/%postname%).

    Tried using Dean’s Permalinks Migration. Also have the WP htaccess control plugin installed. I do not have access to the .htaccess file via the ftp. Tried adding a line to the vars.php file to show it. Not working either.

    Have tried turning all plugins off and starting over. Still getting 404. Any insight would be helpfull. Have explored ever possible scenario on the internet and can’t seem to find exactly what’s wrong.

    • For my particular issue it really boiled down to the server and how this particular server was set up. Very tight security and no htaccess. Changed hosting providers and have resolved all issues.

  22. thank you for a GREAT post! another plugin to note that breaks the permalink/category structure is Global Site Search –> http://premium.wpmudev.org/forums/topic/global-site-search-seems-to-break-category-and-tag-archive-permalinks-in-wp-31

    it took me HOURS to figure this one out – especially since the dev site said all of their plugins were 3.1 compatible. sigh….

  23. I enabled my “default” setting in perma links and that fixed everything. Thanks.

  24. theBlaine says:

    For me it was the Top Level Categories plugin. Bummer too, I like that plugin. Maybe there is another one that is more up to date.

  25. Thanks! Step A for the permalinks fix was all I needed.

  26. LukeAmerica2020 says:

    If this doesn’t solve your category/tag link list 404′s (pulldown and top level menus) when you have a custom permalink for Blog Posts, try this “action” function. It’s worked on every site I’ve tried (including multi-sites) WITHOUT having to tinker with .htaccess, change the existing permalink structure, or disable any installed plugins.

    The problem is with 3.1′s canonical redirect. Here’s the hotfix link:


  27. conservation says:

    Hi, I also have the same problem. in version 3.0.4, i added 1 url rewrite :
    /*Custom url rewrite */
    function mechanical_rules( $rewrite_rules ) {
    $new_rules = array(
    ‘^category/([^/]*)/brand/([^/]*)/.html$’ => ‘index.php?pagename=products&cate=$matches[1]&br=$matches[2]‘
    ,’^brand/([^/]*)/category/([^/]*)/.html$’ => ‘index.php?pagename=products&br=$matches[1]&cate=$matches[2]‘

    $rewrite_rules = $new_rules + $rewrite_rules;
    return $rewrite_rules;
    add_filter(‘rewrite_rules_array’, ‘mechanical_rules’);

    add_filter(‘query_vars’, ‘mechanical_query_vars’);
    function mechanical_query_vars($public_query_vars) {
    $public_query_vars[] = ‘cate’;
    $public_query_vars[] = ‘br’;
    return $public_query_vars;
    “brand” is a custom taxonomy.
    After upgrade version 3.1, it didn’t work.(alway return 404 page). I readed “If Pages Return A 404 After WordPress 3.1 Upgrade” post and tried to fixed it, but i haven’t done it. Please help me.

  28. Thanks a lot, you saved, I was bugging on this issue for 2 hours. In my case, just saving my permalinks as they were solved it. It’s really strange.

  29. This may not be quite on topic, as it might not have to do with upgrading to 3.1.x but it seems related and I’m getting a little desperate. Perhaps you guys can shed some light on the subject.

    I’m finally getting a grip on custom taxonomies, but I’m having an odd problem. I’m working on a magazine website where the posts or ‘articles’ have the taxonomies ‘issue’ (e.g. 56) and ‘column’ (e.g. ‘Community’). Using the permalink structure ‘/%issue%/%column%/%postname%/’, rewrite slug on both, and taxonomy-{taxonomy}.php templates, I’ve managed to get all the following to work:

    - http://www.magazine.com/issue/%issue%/ – lists all articles in an particular issue
    - http://www.magazine.com/column/%column%/ – lists all articles in a column from all issues
    - http://www.magazine.com/issue/%issue%/column/%column%/%postname%/ – shows single article of particular column from particular issue

    Hooray! The problem is… none of my Pages are working!
    - http://www.magazine.com/about – 404!!!
    - http://www.magazine.com/advertising – 404!!!

    I have no plugins active, I’ve rebuilt .htaccess. . . I’m stumped. Default Permalink structure works fine and even /%category%/%postname%/ works. Since I’m toying with custom taxonomies, my issue may be different than the one this topic was started with, but any thoughts would be nice.

  30. Thanks for this. You saved me alot of trouble.

  31. This worked for me. Thank you very much!

  32. Hi,
    I added a force gzip plugin to make the site load faster. worked for a couple of days. then 404 on every page. deleted htaccess. kept coming back. deactivated all plugins. still all 404s but the static front page. some file or process keeps creating the htaccess file. don’t know why.

    permalink page is on custom: %postname% changing to default seems to make no difference.

    still all 404s but static front page.

    Can you help?


  33. Hi,
    I just did a manual update to wp 321. Working on mac. the update was ok however wp site is in tact on dashboard but does not display in browser, blank with correct URL. Theme is auto focus/thematic. I have no htaccess file and I replaced the WP-admin already twice so…. what to do any suggestions?

  34. Why on this earth WordPress is so in love with its default permalink structure which is useless piece of URL structure in my opinion. I’m too getting bugged down with this unwarranted 404 popups. Juggling it from default to custom & vice versa helps, but it is more of hits and misses, you never know if they are going to work by this time or not. This has become a ritual with me after everytime I hit Publish button. Then go on tinkering with permalinks which is a no man’s land once you’ve configured it well. But this bug get you visiting them every-time an article is published … ehhhh

  35. I had the 404 on my pagination, and categories on my menu. Tried the permalinks update – no change. Tried deactivating plugins – no change (in fact when I tried to reactivate I got a 404 page).

    I’ve just changed to a private server, and it’s not a CPanel arrangement, and I don’t know how to access htaccess yet – so that wil have to wait.

    But what did provoke a change was re-installing the WordPress update. Pagination is still broken, but my category menus is working again.

  36. I did what you suggested but still did not fix my problem. I have 404′s on categories only. Posts are working just fine.

  37. Thanks so much for the tips! This saved us hours of troubleshooting after our tags and categories went all over the place for some strange reason. Solved when we refreshed the permalinks. Thanks! :)

  38. I did my brother’s site and we were going crazy on how to get it back. You saved me a lot of work THANK YOU THANK YOU THANK YOU. God Bless and thanks for this site.
    Ms. Cooper

  39. You’re a life saver. Fixed my permalink structure to custom again and all is well in my world. Thanks again for the solution to my issue.

  40. I did everything written above… But didn’t work.

    So I removed my category.php and tag.php fils and re-upload them… But didn’t work.

    I removed every functions.php scripts that refers to “category” or “tag”…. and re-upload it…. AND IT WORKED!

    Maybe this will help someone…

  41. Thank you so much. I have been struggling with the 404 deal and it is working now!

  42. hey, thanks, they worked for me, solved 404 error


  1. [...] This post was mentioned on Twitter by andrea_r, Phill Price. Phill Price said: RT @andrea_r: RT @dremeda: If Pages Return A 404 After WordPress 3.1 Upgrade – http://ctwo.it/8l [...]

  2. [...] Some people are reporting broken permalinks after the big upgrade to WordPress 3.1 – I can confirm I am one of “those people”. [...]

  3. [...] more information, see this discussion on the WordPress Support Forums, If Pages Return a 404 After WordPress 3.1 Upgrade, and WordPress 3.1 infinite redirect after upgrade on Windows [...]

  4. [...] If Pages Return A 404 After WordPress 3.1 Upgrade Share and Enjoy: [...]

  5. [...] You may need to let WP regenerate your .htaccess. Read http://dre.im/if-pages-return-a-404-after-wordpress-3-1-upgrade [...]

  6. [...] Pages Return A 404 After WordPress 3.1 Upgrade | dre.im If Pages Return A 404 After WordPress 3.1 Upgrade | dre.im. February 28th, 2011 | Cat= [...]

  7. [...] en la base de datos: error categories tags 404 wordpress 3.1 – Buscar con Google Mira este -> If Pages Return A 404 After WordPress 3.1 Upgrade | dre.im Venta de Dominios | Vendo sitio dedicado a WordPress Especialista SEO. Freelance copywriter. [...]

  8. [...] The catgory links started returning properly after this. I actually found the fix at this website. Tech Help    Autocomplete in Javascript using Trie [...]

Speak Your Mind


Notify me of followup comments via e-mail. You can also subscribe without commenting.