[resolved] WordPress 3.1 Broke Permalinks (56 posts)

  1. kenrik
    Posted 5 years ago #

    My site was working perfect with custom permalinks. Now after upgrading to 3.1 I get a 404 error using custom permalinks.

    Normal ugly permalinks work but the custom ones are broken :(

    here is my .htaccess please let me know how to fix this.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    # deny access to wp-config.php
    <files wp-config.php>
    order allow,deny
    deny from all
    # deny access to readme.html
    <files readme.html>
    order allow,deny
    deny from all
    # deny access to .htaccess
    <files .htaccess>
    order allow,deny
    deny from all
    # prevent folder browsing
    Options All -Indexes
    # prevent comment posting to requests with no referer
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
    RewriteCond %{HTTP_REFERER} !.*example.com.* [OR]
    RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
    # limit size of request body
    LimitRequestBody 10240000
  2. The .htaccess is always the same, and not where the custom permalinks live.

    The most likely answer is that you have a plugin which is incompatible. Try deactivating all your plugins. Most of the permalink problems that have been on the forums today have been due to incompatible plugins.

  3. kenrik
    Posted 5 years ago #

    All plugins are deactivated...

    Still broken..

    Possibly the theme? What did they change in the permalinks code that broke my site!

  4. kenrik
    Posted 5 years ago #

    I found that no matter what permalink code I try to put in it's still looking for /%category&/%postname%/ in the 404 error. The only permalink that works is "default".

  5. kenrik
    Posted 5 years ago #

    These are my plugins:

    Date Exclusion SEO
    Gravity Forms
    Page Links To
    s2Member Pro
    User Locker
    WPtouch Pro


  6. You may need to let WP regenerate your .htaccess.

  7. kenrik
    Posted 5 years ago #

    Tried it... for some reason it did not regenerate the htaccess file. ?

    I don't know why they had to go and break stuff in this new release :(

    BTW. It's a dedicated server running OSX 10.6.

  8. Tried it... for some reason it did not regenerate the htaccess file.

    Okay, make a BLANK .htaccess file and set the permissions to 755 or whatever you need :) Try letting WP update THAT.

    (Honestly, nothing works perfectly. This is actually a fairly rare issue, and everyone's aware of it. As soon as cause is sorted out, I'm sure there will be something concrete said, but it never showed up in the 3 months of tests we had for 3.1.)

  9. cshrimpt
    Posted 5 years ago #

    Same for me. Site totally hosed. Creating blank .htaccess with 777 perms ineffective as WP 3.1 will not write an .htaccess entry. I'll try a default one from a fresh install, if that doesn't work I'm going back to 3.0.

  10. But it should still give you what to manually paste into your htaccess file.

  11. celular
    Posted 5 years ago #

    I fixed the error by removing from functions.php


    Also I disabled simple tags plugin.

    Now category permalinks works fine on:


  12. Rmedia
    Posted 5 years ago #

    Same here. Completely hosed permalinks.

    I've spend the last few hours trying to get them back, but no dice.

    This is why I generally don't upgrade. Before this, I skipped the last 5 or so releases.

    If I have learned anything, it's that it it ain't broke, the chances of an "upgrade" breaking it outweight having an older version.

    I wish I had gone with my gut longer. Next time I get a stable release, I am not upgrading again unless I really need a feature desperately.

    IMHO, software is actually getting less stable, not more stable.

    I've used Linux for 10 years, and Ubuntu 10.10 is the only one that has ever locked up on me (and it's done it about 8 times now).

  13. alukii
    Posted 5 years ago #

    Not sure if it is related to a problem I just encountered. But could help some people anyway.

    Whenever I would save options in my theme, it would somehow drop the siteurl (domain and path) from all my links.

    I did find a workaround for my issue. In multisite network admin, by saving changes to the site info tab with "update siteurl and home" checked, it rewrites the siteurl and path and everything works again (until i change theme options again).

  14. Rmedia - You would be incorrect, but you're entitled to your opinion. Software is within .004% as stable as it was 20 years ago (per H. Hecht, a risk analyst specializing in software).

    Did you try everything listed in here: http://wordpress.org/support/topic/troubleshooting-wordpress-31-master-list?replies=7

    alukii - Unrelated, I think, but an interesting find! Thanks for sharing.

    OF NOTE! Rolling back to 3.0.5 without a database backup is incredibly risky, and in doing so, you open the door for conflicts. Should your site break after you roll back, you're kinda on your own.

  15. Rmedia
    Posted 5 years ago #

    Yes, I tried it all.

    Ended up having to scrub the site. Even the restoration back to the previous version was borked (apparently there have been numerous database changes between our version and this one).

    We have to go back even earlier and it's taking all day to restore (and probably tomorrow as well)

    Our site was in WordPress for 5 years. That's a pretty good track record, I will admit.

    This release, though ... well ... I'm sorry, really sorry, but it's just inexcusable. Some bugs here or there are of course understandable, but this was a showstopper on a pretty basic LAMP server that has been up 600 days without a single hiccup.

    Not just the bug, but the fact that nobody is really sure how to fix it.

    It's a mess. An unmitigated mess. An effing disaster if you may pardon my french.

    Sometimes, it's better just to leave well-enough alone, and I wish we would have.

    I love WordPress, I really do, but man ... what was who smoking when they decided this was ready for prime time?

  16. We beta tested for 3 months. No one had this problem. If we can't reproduce something, it's kinda hard to debug it and prevent it. Also it's mathematically impossible to test EVERY variation.

    Even the restoration back to the previous version was borked (apparently there have been numerous database changes between our version and this one).

    Depends what version you were ON before you upgraded, really. But the restore SHOULD be 'revert to your older database' and not just copy the files up and pray. Reverting without a DB backup has problems, as you've found, excuse yes, the database was updated.

    Try a blank 3.1 install on your server, see if it works, just for grins and giggles. You're already down the rabbit hole.

    As a reminder to everyone - When you upgrade, make a backup FIRST, then upgrade. And if your life depends on WP, test the upgrade on a NON 'live' site first.

  17. Rmedia
    Posted 5 years ago #

    Look, I'm not arguing, I just find it frustrating. You would too.

    The other thing I just .. don't ... understand is why if something as complicated as say, Drupal, can release updates without touching the database, why WordPress always has to [moronic expletive deleted] around in the data for even the most minor upgrades.

    Leaving the data alone would be a HUGE step in the right direction for stability. Either that, or only touching the data when there is just no other alternative. It should be a last resort.

    It would make going back and forth in versions so much easier.

    I just loaded a completely fresh install of 3.1, it works and it's nice, but as I was going through it, I kept wondering "they needed to munge my database for this? I don't get it.

    If the decision is to include a minor feature and touch the database, or omit the minor feature and leave the db alone, I overwhelmingly vote for the latter. That's just my opinion.

    Stability is everything.


  18. I'm not going to get into a debate about how and why WordPress does what it does, because it will dilute our ability to help in SOLVING your problem.

    Which is the goal of this. If you want to pitch in and help the devs find better and safer ways to do a major release (and yes, 3.1 is a MAJOR release), go do that. But this thread is for SUPPORT and that's as far as we need to go.

    Do you still need help? If not, let's be done here and go about supporting folks :)

  19. Rmedia
    Posted 5 years ago #

    Fair enough, here is my solution:

    I installed 3.1 fresh, in a directory with no files.

    I installed the old WP installation on another domain, and we are literally copy/pasting articles from that site to the new one. All 10,000+ of them.

    It will probably been the end of the week until we are finished, but it works, and it is the ONLY thing that has worked for us.

    We could stick with the old site, I suppose, but I fear what will happen when 3.11 is released. We just need to get over the hump, and nothing listed above did anything at all.

    You have to do what you have to do.

    I suppose the issue is solved.

  20. Drupal does do a DB upgrade, by the way. http://drupal.org/node/570162 step 10

    I installed the old WP installation on another domain, and we are literally copy/pasting articles from that site to the new one. All 10,000+ of them.

    Why not do an export/import with the build in WordPress functionality?

  21. i'm thinking the rewrite rules got flushed, and yes we do have a thread here (still can;t find it) that showed how to re-set them.

    Yes, ipstenu & I sympathize, that's why we're trying to find a way to fix the issue to save you work.

  22. Rmedia
    Posted 5 years ago #

    Oh, this is really embarrassing.

    Somehow, someway,one of our admins turned off mod_rewrite during the upgrade process. Don't ask me how, because frankly it was a fluke.

    I have been misattributing a problem to WordPress that is a result of our own error.

    I feel so terrible. Really I do. I look back in frustration and I feel like such an ass. I was just flustered.

    Please forgive me.

    We got 3.1 working.

    It was not, I repeat NOT a problem with WordPress itself. 100% our fault.

    I'm sorry.

  23. Joerg
    Posted 5 years ago #

    Well it is still the same bug as in 3.0.5


  24. I wonder if it's related to the fact that the blog slug was force returned to 3.1 (after we all had that happy hack for 3.0.x)...

    Nacin said this:

    I think I've seen this before in MU, but I was just never able to reproduce it. It also didn't just happen on upgrade, but that's another story. I ended up just dropping some code in the 404 handler to check if the rewrite rules were corrupted (obvious by the missing /blog/) and set a locking transient then flush the rewrite rules if so.

    So I wonder if it's that the re-write rules are seen as 'broken' because of a non-standard change? Give that Yogie's 'fix' is to re-apply permalinks, that makes a disturbing bit of sense.

    YogieAnamCara - Did you remove the blog slug from your main site?

  25. PPNSteve
    Posted 5 years ago #

    well we have just encountered this error and we're wondering if there has been a fix yet?

    We tried all the permalink flushing and rebuilding, auto and manual generating htaccess etc all with no solution.

    article/page links work perfectly fine, archive and category links do not work however, and either give a single post page (strange) or a 404 not found error..

    Solutions would be nice, huh?

  26. Aphrodite
    Posted 5 years ago #

    Ok I wont open a new thread since I have exactly the same problem on a multisite install, BUT ONLY on the main site !!!

    All subsites are /%category%/%postname%/ (know it is bad as otto says ;) but works.

    Only main site is affected, and impossible to :

    - access post using /%category%/ in slugs
    - acces post clicking on any category / tag link

    as you can see on this page : http://passion-cheval.net/dossiers-articles/

    I removed the %/category%/ in the permalink to keep the post accessible, but clic on the act or tags it retrurn a 404

    uggly permalink works BUT links by categories dont anyway.

    WP 3.1 updated from 3.0.5
    BP 1.2.8
    HTaccess WP generated with no other rules

    EDIT :
    Ok solved for me.
    A plugin using $wp_rewrite; function.

    But anyway there is an issue on that... too many people complains about it !

  27. Solutions would be nice, huh?

    there were two rewrite rules that got updated.

    go back to the network setup screen and get the htaccess file rules. paste them in.

  28. Aphrodite
    Posted 5 years ago #

    huh ok but where do you find this on a running network ?

    there is no more "network setup screen" !

  29. there is no more "network setup screen" !

    Sure there is.

    unless you removed the line from config that shows it. Some instructions told you to do that. (not mine)

    define('WP_ALLOW_MULTISITE', true);

    this line shows the menu item. this is all that line does. the menu item will be under network admin after setup.

    it is different than this line:

    define('MULTISITE', true);

    which tells wordpress a network is running.

  30. Aphrodite
    Posted 5 years ago #

    Ohhhh ok

    of course deleted this line :)

    ok ok trying that immediatly :)

    so my htaccess is exactly as mentionned...

    Anyway, found the culprit (a plugin)

    my rewrite are fine.

    thanks :)

Topic Closed

This topic has been closed to new replies.

About this Topic