WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks not working (how to restore?) (14 posts)

  1. blork
    Member
    Posted 4 years ago #

    Hello. As of a few days ago, the permalinks on my blog are not working (http://www.blork.org/blorkblog/).

    The front page of the blog loads, but that's all. Permalinks all result in "Page Not Found" errors. The archive seems to be hosed as well (or at least not accessible). Note that when I log in, all of my posts seem to be there.

    Background: I've been having a lot of weird server problems with my provider over the past few months. E.g., pages not loading for minutes at a time. Things disappearing and reappearing, etc. A couple of weeks ago they told me they had migrated the site to a different server after I complained (again) about blank pages.

    Now they're saying I logged in on Dec. 7 and removed the folder called "2009" and that's why the permalinks are not resolving. Well, I did not log in on Dec. 7, and even if I did, I would not have removed any folders. They want to charge me $50 to restore the files.

    Aside from the fact that I was probably hacked (I'll deal with that separately), I need to understand the following items, and I'm hoping someone here can help:

    (1) What's up with the flat files? I thought WordPress was database driven, so why does removing a folder of flat files called "2009" hose my site?

    (2) Is it realistic to assume that if the provider restores that "2009" folder, that everything will come back?

    (3) Is there a way to re-create the contents of that folder by doing some kind of "rebuild" within WordPress? (I.e., by republishing all, or something like that?)

    My blog is going to be nine years old in a couple of weeks. I'd like for it to be healthy! Many thanks for any help!

    e
    d

  2. alism
    Member
    Posted 4 years ago #

    Switch to the default Permalink structure: Admin > Settings > Permalinks
    Save Changes. Then switch back to what you were using previously. Save Changes again.

    What happens?

    If it doesn't work, delete your wordpress .htaccess file and try again.

  3. blork
    Member
    Posted 4 years ago #

    Thanks Alism! I switched to the default structure and everything came back. All permalinks were resolving. When I switched back to Date/Name mode, they all broke again.

    I removed the htaccess file and it didn't make any difference. Note that when I changed the structure back to Date/Name mode, WordPress provided a tip about updating the htaccess file. I made the suggested changes (which did not appear to be any different from what it already was) and that didn't change anything either.

    So it works in default permalink mode, but not Date/Name mode. What now?

  4. alism
    Member
    Posted 4 years ago #

    Try replacing what's in your .htaccess file with the following:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Otherwise, have you changed anything? Upgraded any plugins? Installed any new ones? Might be worth disabling your plugins, just to rule that out too.

  5. blork
    Member
    Posted 4 years ago #

    Thanks again. that htaccess didn't work.

    Also, I tried deactivating my plugins, and that didn't fix it.

    Otherwise, I have not made any changes in some time, so I have no idea what's causing this.

  6. blork
    Member
    Posted 4 years ago #

    Update! It seems to be working now. Thanks!

    It didn't work with your modified htaccess because I forgot to edit the RewriteRule line (my blog is not at the root, so I had to add the subfolder to the path).

    Thanks bunch! Woo hoo!

  7. blork
    Member
    Posted 4 years ago #

    One other thing: for educational purposes, can you explain what the code in your htaccess file means? (Specifically, the non-standard part: "ErrorDocument 404 /index.php?error=404".)

    What is that, and how did you know it would fix the problem?

    Many thanks!

    e
    d

  8. alism
    Member
    Posted 4 years ago #

  9. blork
    Member
    Posted 4 years ago #

    OK, but the problem wasn't not finding the 404 page, it was not finding the permalinks. What's the connection?

  10. ericstandlee
    Member
    Posted 4 years ago #

    None of this fixed my problem. Only setting permalinks to default makes the page links work, but they are now p=1 etc.

    How do I get permalinks to /pagename/ working again?

    I just updated to 2.8.6. No other changes.

    .htaccess is writeable and wp is changing it when updates to permalinks page is saved.

    wp-admin is accessible and works fine so this is not mod_rewrite / rewrite_module.

  11. ericstandlee
    Member
    Posted 4 years ago #

    Found it!

    Have not updated apache only wp to 2.8.6, and older wp versions running on other sites hosted on same box aren't broken.

    But, when I made this change it fixed it:

    edited httpd.conf:
    AllowOverride All

  12. resmyrranda
    Member
    Posted 4 years ago #

    I had the same issue with 404's after upgrading to WP 2.9 and needing to restore my db. The fix that worked for me, inspired by reading this thread, was to go in and make my htaccess writable (right click on the file, tick appropriate boxes for file permissions), surprisingly it wasn't. Then I set my permalinks to default, saved, then set them to date and name, all better now, thank you guys!, a very happy New Years to you!:)

  13. uberhog
    Member
    Posted 4 years ago #

    I had the same problem, none of the above worked for me.

    Enabled the rewrite mod

    mv rewrite.load ../mods-enabled

    restarted apache

    and it works

  14. David Gard
    Member
    Posted 4 years ago #

    had very similar problem only with just the two new Custom Post Types I had added not displaying. Worked fine with no permalink but not at all with.

    To resolve I deleted the .thaccess file and let WordPress recreate - easy enough to resolve in the end, once I had found this post, but surely the question should be 'are wordpress doing anything to fix the issue'? If not, how do we tell them that the issues exists?

Topic Closed

This topic has been closed to new replies.

About this Topic