How to fix – Error 500 – Internal server error

February 16, 2009 by Lee Jones
Filed under: FIX-IT, HOW TO 

logo How to fix   Error 500   Internal server error

 

 

Error 500 – Internal server error

If your in the unfortunate position of receiving a

“Error 500 – Internal server error

An internal server error has occured!

Please try again later.”

This seams to happen regularly on a lot of servers when ever you  increase the amount of plug-ins you activate in your Wordpress blog .

If so, then hopefully this will help!

logo How to fix   Error 500   Internal server error

A lot of my subscribers have had this very problem and asked me if i had a fix. It seamed that a lot of them who where having this problem where hosting their wordpress  blog with 1&1, and the problem seamed to start after updgrading to versio 2.7 of wordpress.

After a few hours of investigations, I have found an answer that seams to help anyone with an 1&1 account, but the solution should also be tried if using another Hosting Provider.

  1. Firstly create a new file in notepad or similar  and enter the following:php_flag register_globals off
    register_globals = 0
    memory_limit = 64M
  2. Save this file as php.ini and upload it to your /wp-admin/ directory of wordpress

That’s it, simple wasn’t it ?

Apparently this has to do with some host servers generally limiting the php access to under 8MB, which is clearly not enough if you are  installing a lot of plugins at once.

Also, if this  doesn’t work for you, you could try editing  or create an .htaccess if one is not already present.  This will make sure that your php files will run with php5, this can be true if Apache by default is running an earlier version of php.

Just put the following lines in the file on its own lines:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

The .htaccess file is usually to be found in the root directory of your wordpress blog or website, and is simply a text file that can be edited with Notepad or similar, but  do ensure you save it as .htaccess and not a .txt file.

NOTE: If you already have an .htaccess, then just edit this file, DO NOT over write  it, as the contents may be required for other usage, if you dont have one then just create a new one.

(do remember to put the dot before the htaccess when naming the file)

Hope this fixes your problem!

 

I have other Fixes for common windows XP problems – click here

Written by Lee Jones - Visit Website WordPress Plugin Share Bookmark Email

Instant slide Up  

INSTANT SLIDE UP

25.3% MORE Opt-In users - 20% CLICK THROUGH

Unobtrusively, get your advertising job done. Whether it’s an announcement, a special offer or an opt-in, this original and completely customizable system will enhance your page’s appearance and increase sales.    Click for more »


 Powered by Max Banner Ads 

Comments

10 Comments on How to fix – Error 500 – Internal server error

  1. dc on Thu, 26th Feb 2009 8:47 PM


  2. I tried this, and it will work for a little while, and then I will start getting the error again until I reupload the the .htaccess file again. Any ideas why I have to keep uploading the file? Thanks so much. I have been working on this all night and seem to be getting nowhere.

  3. Lee Jones on Thu, 26th Feb 2009 9:12 PM


  4. Hi dc

    As you are uploading the .htaccess file, then i presume that there was not one there originally, or you would simply be editing.

    It sounds to me that if it is working when you first up load, then something else is also writing to the .htaccess file, by checking the file before and after should give you a clue as to where the changes are occuring.

    If establishing what is writng to it is beyond your capabilities, then try uploading the file again, and while in your FTP program, change the attribute permissions, probably set as 755, but right it down before changing so you can always go back ( normally right click on file and choose CHMOD or attributes) and change the number to 555 or 444 and see if this helps

    The only problem with this is you may be blocking something else, but give it a try first as you can easily change it back to what it was before.

    Let me know how you get on !

  5. dc on Thu, 26th Feb 2009 11:50 PM


  6. Thank you so much! So far that is working. I have no idea why it kept changing or what was writing to it. It was changing just from viewing the site without even changing anything on my end. It’s a brand new site. I don’t even think google has picked it up yet. I’m just not sure if this was a wordpress issue, plugin issue or a hack.

    Thank you so much.

  7. Lee Jones on Fri, 27th Feb 2009 9:20 AM


  8. Your very welcome,

    Just be aware that this was just a last resort solution to your problem, and not the fix.

    There is something writing to your .htaccess file, which may be required to allow correct function within your wordpress or something else related to your server, and should you notice strange things happening (or not working correctly) then just keep this in mind and try changing the permissions back to 755.

    Obviously , then you’ll need to examine what the changes are to the .htaccess to try and fix the problem………… anyway, I’m glad to have been of help and that it now works for you !

  9. dc on Fri, 27th Feb 2009 1:41 PM


  10. You are so right. I don’t know anything about the .htacess file, so I hadn’t taken a good look at the file thinking that I wouldn’t know what I was looking at anyway. But today as I was getting ready to close notepad that had a copy of the file on it, I happened to glance at it and saw it repeated the same thing over and over, except for one part, and when I googled that one part, I couldn’t find any information on it(i’m pretty sure there was something not right about that code. The syntax looked amiss.), so I took a look at a working .htacess file from another site of mine that is setup similarly to this one and noticed that all it had was the code that mine kept repeating…..but only had it once and didn’t have the other part at all. So I used that .htacess code for this site, too, and it is working now…or seems to be. I haven’t noticed it rewriting the file anymore.

    I still have no idea how it got this way. I have never edited that file before today. I didn’t even know where it was until it started messing up last night. I’m keeping an eye on it for a while just to make sure everything is working ok..

    Thank you so much for helping me to “stop the bleeding” until I could get the code fixed.

  11. Lee Jones on Fri, 13th Mar 2009 7:26 PM


  12. GREAT!

    Just let me know if you need any more help

  13. Balu on Sat, 23rd May 2009 4:39 PM


  14. Hi Lee,
    I just came across your blog coz i am really bugged up with the 500 internal server error while i am editing and updating my post some on my blog through the admin panel.I am currently running on WP 2.7.1 and i have upgraded it from 2.3 very recently.I used my previous datas in my database and upgraded the database using the admin panel of wordpress.I have done the php.ini config stuff as you said but still i am experiencing the same error.i have checked whether it is an issue with my theme by reverting back to the default still the error is popping up.What should i do now?

  15. Ben Shaw on Sun, 22nd Nov 2009 2:59 PM


  16. Hey!

    Thanks so much for posting this – worked perfectly!!! You saved me hours!

  17. Kopi Tribulusdynamic on Tue, 26th Jan 2010 12:14 PM


  18. Thanks, this worked for me…but in a roundabout way…I was just ggetting 500 errors on my modules page,when it wouldn’t load.

  19. Shashi on Tue, 23rd Mar 2010 2:53 PM


  20. Thank u so much…

    Its working fine…..

Tell me what you're thinking...
While your at it, Why don't you get one of these fancy pictures to show with your comment, go get a FREE gravatar!





FREE - JOIN TODAY

lee jones email subsriber newsletter Yes Lee,
I would like to get your FREE Newsletter

Lee Jones Blog subscriber newsletter
Name:
Email:

PRIVACY NOTICE
I will never pass your email address to anyone else and you may opt-out any time

Follow me on Twitter!
twittertwitter counter