• I am a newbie to WordPress, and in an attempt to fix a problem, I think I started a chain of events that has now led to a 500, internal error. I hope to recreate the situation so that you guys can help. I’ve checked other boards, and I am getting such mixed answers I thought I’d put it all in one place.

    1) The comments weren’t showing up. I could see the number of comments per post, but the link to the comments page (post page) didn’t show the comments or a place to put them.

    2) So I changed the permalink via admin -> options to resemble the only way I could view comments: when the link was sent through email (thanks Subscribe2 plugin!) “?=%postnum%”

    3) This change causes a 500 error. When I check the server log, it says:

    RewriteRule: cannot compile regular expression ‘^?=category/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$’\n

    4) So Now I’m in an EVIL cycle: to solve the 500 error, I delete the .htaccess file and put a new (blank) one there. Then the site comes back up, and as I go to admin->options, permalinks, that same faulty permalink is there, and then the system crashes again, without giving me a chance to change it. So I go to copy a start a new .htaccess, and start the cycle over.

    I think if I can clear the SQL or cache of that faulty permalink structure, then it won’t come back up when I put in a new .htaccess. Obviously that data is being saved somewhere else. But how do I do that?

    And once I get the system back up and running, how do I fix the comments so they work.

    I’m running version 1.5.

    Thanks for the help!

Viewing 4 replies - 16 through 19 (of 19 total)
  • I had the EXACT same problem as you described. I entered an incorrect Permalink structure and was in the vicious cycle. You are correct about the caching of the errant structure. Open PHPmyAdmin and do a search on “permalink” in your WP database. You will find a match under the table: wp_options. Edit that field and you will find your errant structure. Correct the structure, delete .htaccess and then go to your site. Under options -> Permalink, you will see the correct structure listed. Click on update permalink structure and your site is up and running. I too did not want to start over. Thanks for leading me in the right direction.

    I had that same problem, and I followed the instructions above. The pages are working now but my archive is gone.

    eep, I take that back, everyone works beautifully… THANK YOU!

    Hello
    Recently I got stuck too from playing with permalinks pattern tags; I searched for help and I found this thread. Seems like the problem hasn’t been resolved yet, I shall contribute then. After experimenting many things, I eventually got back my blog, and actually thanks to the tips of “deleting .htaccess and checking mysql databases” I read on this thread.
    Please excuse my awkward use of english as I am not a native speaker.

    This is aimed at newbies and it’s sole purpose is debugging. If you still wants nice permalinks, try this first and you’ll decide later. Of course, it isn’t the perfect and universal solution, it’s just MINE.
    So, if you are stuck too with the annoying internal error 500:
    First, don’t panic. Else you might screw the whole thing and in the worst case may definitely lose all your database.
    Go on your FTP server, at wordpress root (where the index.php is located). You should find a file named .htaccess, delete it. Now. If it doesnt appear, try to tweak your ftp software options so as to show ALL files.
    Try to reload the main page of your blog. Seems to be back, good. Everything? No. The fun thing begins now.

    The problem comes from your mysql database where some tables were screwed up ’cause you changed the permalinks pattern.
    So go on your admin dashboard, plugins section. Try to avoid at all cost getting on the permalinks page or you’ll be stuck with error 500 and you will have to do the first part again. On the lastest versions of wordpress you should have a plugin for database backup. Activate it, then go to the Manage section and you’ll see a “backup” tab at the right end. Do a backup of your database, and save the file on your hard disk. It should be gzipped; open the archive with winzip or winrar and extract the file; open it with your favorite text editor, search for the word “permalink”, it should bring you on the line
    INSERT INTO wp_options VALUES (34, 0, 'permalink_structure', 'Y', 1, 'the_evil_thing_is_here', 20, 8, '', 1, 'yes') ;
    DELETE THE EVIL THING! You should have then:
    INSERT INTO wp_options VALUES (34, 0, 'permalink_structure', 'Y', 1, '', 20, 8, '', 1, 'yes') ;
    Don’t save the file, keep it open and locate the entire wp_option tab contents which should go from
    # Data contents of table wp_options
    to
    # End of data contents of table wp_options
    Highlight the whole thing and copy it (ctrl+c)

    Connect to your mysql database (phpmyadmin). You’ll see a list of wp_thing tables where all your blog contents are saved. You’ll see an existing wp_options, don’t worry. Search around phpmyadmin for the SQL tab where you can execute SQL code, and paste what you’ve copied earlier. Execute it. The existing wp_options has been overwritten and everything should be back to normal now; rejoice, dude.

    Try to surf around your blog, everything should be back to normal, but…
    As I am french, my language got numerous written accents, and unfortunately, the backup plugin screwed all of them up. But this is another problem, the only solution I’ve found so far is to edit all your posts and comments, but that’s a very long process and needs a lot of patience. If you are french and still want to try the whole trick, feel free to mail me on maho_windforce27 at hotmail.com. I’ll be happy to help you out.

    Hope this helps.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Permalinks, htaccess and 500 errors — I crashed my system’ is closed to new replies.