WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] WP 2.0 messed up my permalinks

[Resolved] WP 2.0 messed up my permalinks

  • Hi!

    Today I upgraded 1.5.2 to 2.0. After the upgrade my permalinks are not working at all. I get WP generated 404’s on all pages. Once I set the permalink options to “Default” everything works fine again.

    After entering the permalink structure I used before the update (/%year%-%monthnum%/%postname%/) and pressing update I get 404’s. I tried deleting the .htaccess (which I didn’t keep from the 1.5.2 install, it must have been generated by 2.0), setting the permalink options to “Default” again and updating. After that I switched to “Custom” (/%year%-%monthnum%/%postname%/) again and updated to let WP write another .htaccess. This .htaccess reads:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php
    </IfModule>

    # END WordPress

    http://www.almehag.se/tmp/dump_env.html shows the base page generated by Dump Enviroment 1.0.1 (check the source) with the permalink structure I want to use enabled (/%year%-%monthnum%/%postname%/) if that helps anyone.

    Upping the old .htaccess I used for 1.5.2 again doesn’t work either. You can check out my old htaccess here: http://www.almehag.se/tmp/htaccess.txt . It is for some reason substantially bigger than the new one that WP2 has generated.

    My blog is here (I’ve changed the permalinks to “Default” for now as nothing else works): http://blog.almehag.se/

    Any help appreciated, I’m quite frustrated.

    Thanks in advance…

Viewing 15 replies - 1 through 15 (of 52 total)
  • Looks like you have some redirection going from your subdomain to a subdirectory that breaks the new permalink processing. I sent you a patch that might help.

    Ryan solved the problem in a mail he sent to me.

    I updated these files:
    http://trac.wordpress.org/file/trunk/wp-includes/functions-post.php?rev=3390&format=raw
    http://trac.wordpress.org/file/trunk/wp-includes/classes.php?rev=3395&format=raw

    I then deleted the .htaccess and then went to “Customize Permalink Structure” and entered my /%year%-%monthnum%/%postname%/ format and clicked “Update Permalink Structure” so that WP would write a new .htaccess. That’s it. Ryan is my idol! 😉

    And thanks for reporting back! How about changing the dropdown at the top to “resolved”?

    Consider it done!

    Thanks much, and have fun!

    This worked for me too, thanks so much, it was driving me insane. What exactly was the problem though and what was the fix in the patch?

    yes, it would be helpful to know the exact nature of the problem so we could help others in similar situations.

    I wrote a post after upgrading painlessly (ironic eh?) and did a trackback to Lorelle. Fortunately she alerted me that the link was producing a 404 (an internal WP one). No idea why as all the other posts worked fine.

    Although I applied Ryan’s patch above and it appeared to fix things, actually I’m not sure it made any difference. I made the classic bug-hunting error of changing two things at once. The timestamp in the trackback on Lorelle’s site was dated one day later. it had the timestamp of 01/02 (2nd of January for us Europeans) but my post timestamp was 01/01 in my WP interface. No idea why that should be or how it happened. So I’m not sure if Ryan’s patch made any difference at all, but I’ll leave it in anyway. I re-stamped the post and it works, of course.

    Perhaps this is something wrong with the UTC calculations (my blog is hosted in the US but adjusted to Australian EST time and I’m currently posting from Germany)? Maybe just a lag in the trackback process that pushed it over the dateline?

    My post about tracking this down in the WP support threads and the original broken post (now fixed) are here.

    p.s. The RSS feed for this support thread doesn’t seem to work for me.

    Here are the latest functions-post.php and classes.php. Those fix all permalink bugs that I am aware of. If you grabbed the classes.php mikae1 linked to above, please update to this classes.php. It fixes a paging bug.

    Copy those two files into wp-includes and then visit Options->Permalink to force the rewrite rule cache to update.

    Sorry for the permalink bugs. Supporting all of the different hosting environments is difficult.

    I uploaded the two files, deleted the old .htaccess and updated the permalinks structure to

    (/%year%/%monthnum%/%postname%/

    but still i get error 404.

    htaccess looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php
    </IfModule>

    # END WordPress

    Do i make something wrong?
    Thanks. ciao

    rogopag, to help me debug, download, install, and activate the Dump Env plugin. Visit a page that is giving a 404. Save the page source for that page. Forward the page source to ryan at boren dot nu. Deactivate the plugin when finished.

    http://wordpress.org/support/topic/54547?replies=21#post-298784

    I should note that it is NOT my WP-generated 404 that is appearing.

    I had the same problem.

    My blog http://blogpro.toutantic.net is hosted at textdrive.com.

    When I try to switch my permalink to “Date and name based” I get 404 from apache.
    I tried the latest functions-post.php and classes.php but the problem was still there…

    blogpro is a directory under my root…

    Went to Option page and modified it like this
    WordPress address (URI): http://toutantic.net/blogpro
    Blog address (URI): http://blogpro.toutantic.net

    It works!

    Just one problem left
    I canno’t use the url http://blogpro.toutantic/net/wp-admin for administration I must use
    http://toutantic.net/blogpro/wp-admin

    hello ryan,

    sorry for the delay. I did what you ask me for and sent you the file. I hope is ok and useful.

    thank you for now, waiting for you.

    ciao. rogopag

    Ryan’s patches have both worked and not worked for me…

    My Extended Live Archives were totally borked, and installing the patched files has brought it back to life. Hooray!

    However, The ability to generate a tag-based index when using anything other than the default URL format with Ultimate Tag Warrior is still broken. I am not sure of a solution on that at this point, but am talking with the plugin author, Christine, about it.

Viewing 15 replies - 1 through 15 (of 52 total)
  • The topic ‘[Resolved] WP 2.0 messed up my permalinks’ is closed to new replies.