how to fix 500 Internal server error in wordpress

First of all, my apologize to you for not being able to access blogjer this evening, it’s due to 500 Internal server error. I’m not sure when it had started, but in my spot check on the error log (only shows the last 300 lines), the oldest one is at 11 AM GMT (6.00 PM Malaysia time).
I have seen this error a few times before, so I guess I know what is going on. But it turns out that I’m wrong. In fact I’ve no idea of what is going on, and why it happens??
Ok, before that, to give you a basic idea about 500 internal server error, it normally happens when your .htaccess file is corrupted of having syntax error. Keep in mind that this is NOT due to server down or Apache error.
What happened
My web-hosting company had just upgraded the cPanel to the latest version. When I logged in to cPanel, I was a little bit panic when I didn’t see my .htaccess file. To make me feel more nervous, other websites that is hosted on the same hosting package have their own .htaccess file and their .htaccess invisible too, but all of them work just fine.
I then opened an ftp connection to my web-hosting, oh I’m relieved, could see that the file is still there. I compared it to my other blogs’s .htaccess, it is similar to the others though. I lost!!
Without any delay, I cut a ticket to my hosting, and within 20 minutes everything is settled. Kudos to NetKL!! It turns out that this is syntax error, where there is a duplicate close tag in the .htaccess file. But.. the extra close tag has been there for quite sometime and blogjer works fine so far.
...........
...........
Redirect temp /xxxxxxxxx
I don’t understand why it works before and not after the cPanel upgrade. Need more digging perhaps.
On why the .htaccess is invisible from cPanel, this is the security enhancement on the new cPanel version. The files are only viewable and editable from FTP client.
What I can suggest if you get this error?

- Open your cPanel, locate where your error log is. See the screen shot above. It is located somewhere at the bottom of your cPanel main menu. In my case, I saw an error something like this which mention about .htaccess
- If you can view your .htaccess file from your cpanel, that would be better. Otherwise you need an ftp client such as coreftp or filezilla to do that. From your ftp client, download your .htaccess file to your local machine.
- Validate your .htaccess file with Alterlinks. This tool would be able to identify anything wrong with it. Fully loaded yourself with more info at .htaccess page
- After identify what’s wrong try fixing it by yourself. Google is always there for you. And don’t forget your web hosting company!!
[Mon Feb 18 17:59:22 2008] [alert] [client xx.xxx.xx.xxx] /home/public_html/blogjer/.htaccess: without matching section, referer: http://www.google.com/search?hl=en&q=DELL+MALAYSIA&btnG=Google+Search
Preventive action
There is nothing better other than having a backup of your .htaccess elsewhere. Preventive is better than cure. Utilize your cPanel backup function
Further reading
There are a lot of HTTP status codes, 500 is only one of them. To know more status codes such as 200, 300, 400, are, turn your browser to HTTP status codes.
Happy reading and blogging!!






Hi Zaki,
Glad to see your blog is okay now.
I do not understand this:
“…their .htaccess visible too, but all of them work just fine.”
Do you mean invisible?
P.S. I just got back today and have received the T-shirt you sent. Thanks, mate!
500 Internal server error never happen to my site yet, however thanks for let me know how to fix it incase it happen someday.
you r on netkl to .. cool
so far didnt face this problem
Wow…thanks for the info…Last time I had this problem …i gave up….at least now…i can know what to do…
I have faced this problem of internal errors many times and it was always difficult for me to solve. But this information has helped me a lot to face this problem easily.
Yes, blogjer on NetKL
You’re rite, type error.
Cool!! Hope you like it
Hehe, I learn from mistakes too
cool precaution. i will need this some time if affected
dun play2 with .htaccess hehe..
luckily your blog is okay now…
it happen to me today.. :p luckily it just blog experiment during tutorial.
Thanks for the info! Great! At least here i have info for that problem.
It’s the hosting company who play2, hehehe
Nice info. Thanks!!!
Thanks a lot for the info… it was very helpful!
Sure, you’re most welcome. Hope to see you again
Many thanks, I had an .htaccess file for joomla on one site and tried to use cpanel to set up a redirect which then went on to corrupt the .htaccess file, simply removed the bit cpanel had tagged on and BAM, working again. Good work
If your domain is on linux server and you are using cpanel than you can get 500 internal server error if you have wrong directory /files permissions. Directories and folders should be 755.
.
for more info:
http://www.bestarticleworld.com/2010/01/500-internal-server-error-causes.html
In my case, the Rackspace hosting / wordpress automatic upgrade combination caused the permission of all the files under wp-admin and wp-includes to be changed from 644 to 755. If you know how to upgrade wordpress manually, that might end up saving you more time especially when you are working with an unfamiliar host.