WordPress.org

Ready to get started?Download WordPress

Forums

Changing permalink structure leads to Error 500. (33 posts)

  1. DanielSchoen
    Member
    Posted 8 years ago #

    Hi.

    I've gone through two providers and I think this is a WordPress problem. As soon as I change the structure of my permalinks to one of the defaults (2006/05/23/article), my blog says goodbye and all I get is an Error 500, Internal Server Error.

    What's especially frustrating is that I can't even restore everything by deleting the MySQL tables and loading a backup (made just before I changed the permalinks). Fortunately, I didn't have that much content yet.

    Any chance I can work around this? I really want my permalinks to be structured in that way but that seems directly related to the error.

    Thanks so much for your help, I appreciate it.

    Cheers,

    Dan

  2. Chris_K
    Member
    Posted 8 years ago #

    Are you using the Custom permalinks field? If so, what are you entering into it?

  3. DanielSchoen
    Member
    Posted 8 years ago #

    Nope, the standard option.

  4. Chris_K
    Member
    Posted 8 years ago #

    What's that? I'm looking at my Options -> Permalinks page and I don't see a "Standard". What verson of WP are you using?

  5. DanielSchoen
    Member
    Posted 8 years ago #

    WP 2.0.2.
    I meant to say one of the given options (that would change it into the format I mentioned above).

  6. Chris_K
    Member
    Posted 8 years ago #

    "Date and Name based"

    Well, that certainly shouldn't be causing Error 500s. In fact, it is what I use on my blogs and doesn't.

    Are you hosted on windows or linux? Apache or IIS?

  7. DanielSchoen
    Member
    Posted 8 years ago #

    That's the one. The server is running Apache & Linux.

    Thanks.

  8. Christopher J. Hradil
    Member
    Posted 8 years ago #

  9. Chris_K
    Member
    Posted 8 years ago #

    Same as the 95% of the rest of the world. Hmm...

    Ok, some things to check.

    1) When you visit the Options -> Permalink page and change to that setting, does WP display (at the very bottom) a message indicating that it can't write to your .htaccess?

    1.1) If that message is there, be sure to follow the directions listed.

    1.2) You do have an .htaccess file, right? If so, would you be willing to share what is in it?

    2) Can you confirm with your host that they have mod-rewrite enabled AND AllowOverride properly set for you?

    More light reading here: http://codex.wordpress.org/Using_Permalinks In particular, look over the trouble-shooting / fixing areas and see if you get any ideas.

    If nothing else, try putting this in the custom field and see if it does anything: /index.php/%year%/%monthnum%/%day%/%postname%/

  10. DanielSchoen
    Member
    Posted 8 years ago #

    Thanks guys, I will try it out tonight.
    Truly appreciate your help.

  11. DanielSchoen
    Member
    Posted 8 years ago #

    I just deleted the .htaccess file and the blog is back up.
    (Without the permalink changes, obviously.)

    What does that mean? What should a .htaccess file for the desired format look like? Can't I just create one myself?

  12. pablete
    Member
    Posted 8 years ago #

    I'm so stupid! I did the same with the same result. Please tell me how to bring my blog back!! with all the comments...
    I cannot find the .htaccess file, where is it????
    Thanks

  13. DanielSchoen
    Member
    Posted 8 years ago #

    It should appear in the root directory of your blog.
    Make sure your FTP client is set to 'show all files'.

  14. pablete
    Member
    Posted 8 years ago #

    Ok, I can see it now. What should I do? (as far as I am a complete dummie, can you explain it step by step?)
    What will happen if I delete that file?
    Will I be able to enter in the admin panel again?

    thanks for your help!!!

  15. Chris_K
    Member
    Posted 8 years ago #

    Create a file named .htaccess and upload it to your blog's directory. No extension on the file name. You can leave it blank.

    Go to your blog's Options -> Permalinks. Look at the bottom of it. If WP detects that it can't edit the .htaccess, it will provide a field with what you need to copy and paste into your .htaccess. If WP *can* update it, there won't be a message. So, update manually if you need to. Hit apply.

  16. pablete
    Member
    Posted 8 years ago #

    I've spoken to my host and they don't have enable the mod-rewrite enabled. They won't enable it and they won't set it for me...I guess that once I'll be able to recover my blog I must accept the URL structure that worked...but first I need to recover my blog

  17. pablete
    Member
    Posted 8 years ago #

    I'm feeling like a stupid:
    - I don't know how to create a .htaccess file (I've tried to do it using the Windows file explorer)
    - If I mange to create it: should I place it in the blog's directory (If I do so it will tell me that this file already exists, and I guess I should press accept to rewrite it)
    - Once I've done that I will update those files using Filzilla
    - Then I should try to enter again in the admin page (will the server error be there?)

    THANKS very much for your help

  18. Chris_K
    Member
    Posted 8 years ago #

    Windows explorer. Ok, right-click and choose New Text File.
    Highlight it and rename it to .htaccess.

    FTP it up to the blog directory. 644 permissions should be fine.

    After FTP'ing, verify you don't have a ".txt" on the end of the file name -- if you do, remove it.

  19. pablete
    Member
    Posted 8 years ago #

    I love you guys. My blog is back!
    I guess I must forget about changing the URL structure...
    Thanks again

  20. DanielSchoen
    Member
    Posted 8 years ago #

    The same thing is happening as soon as I want to change my About page, by the way.
    This is getting nasty.

  21. Chris_K
    Member
    Posted 8 years ago #

    After you select the Name and Date structure and save, is .htaccess still empty?

  22. DanielSchoen
    Member
    Posted 8 years ago #

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

    # END WordPress

    This is it.

  23. Chris_K
    Member
    Posted 8 years ago #

    Mmph. I don't think your host is enabling AllowOverrides.

    From an earlier post of mine in this thread:

    If nothing else, try putting this in the custom field and see if it does anything: /index.php/%year%/%monthnum%/%day%/%postname%/

    (after clearing out your .htaccess again I suppose)

  24. DanielSchoen
    Member
    Posted 8 years ago #

    Hm. Is there a way of testing whether AllowOverride is enabled? I don't know too much about it.

    Making the index.php part of the URI should be the last resort.

    edit:
    Does anybody know of any free providers of MySQL databases everything I need for WordPress to run smoothly?
    I only need the database, since my own provider (which costs around $100 a year) doesn't properly provide that.

    I'm so sick of this.

    Thanks.

  25. Chris_K
    Member
    Posted 8 years ago #

    If you have root access to the server, you could check your httpd.conf.

    Or ask your host.

    I'm sure there's something simple we could drop in your .htaccess to test as well, but I'm drawing a blank.

  26. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    I've spoken to my host and they don't have enable the mod-rewrite enabled. They won't enable it and they won't set it for me.

    Change hosts.
    Seriously.
    If a host told me any of the above, I'd say "well, then I guess I won't be paying you any more" and hang up.

  27. DanielSchoen
    Member
    Posted 8 years ago #

    At the moment, I run the database seperate on a different host. This may be a stupid question, but which of them needs to support AllowOverride and mod-rewrite?

  28. Chris_K
    Member
    Posted 8 years ago #

    Whichever box has your Apache web server on it.

    Say - I never asked, what version of Apache?

  29. DanielSchoen
    Member
    Posted 8 years ago #

    Apache 2.o, if I'm not mistaken.

    I'm that close to switching hosts. Any recommendations?

  30. DanielSchoen
    Member
    Posted 8 years ago #

    Now this is weird. My host just confirmed that mod_rewrite is enabled and should work just fine. What am I doing wrong? I tried chmod'ing the .htaccess to 666 without results.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags