how to fix 500 Internal server error in wordpress

500error

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?

cPanellog

  1. 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
  2. [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
  3. 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.
  4. 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
  5. After identify what’s wrong try fixing it by yourself. Google is always there for you. And don’t forget your web hosting company!!

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!!

Top commentator contest update, blogging, web hosting and FA cup Top 9 validators for blogger

Related Posts

21 Responses to “how to fix 500 Internal server error in wordpress”

  1. Raymond says:

    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!

  2. catzer says:

    500 Internal server error never happen to my site yet, however thanks for let me know how to fix it incase it happen someday.

  3. azwanhadzree says:

    you r on netkl to .. cool :)
    so far didnt face this problem

  4. alzack says:

    Wow…thanks for the info…Last time I had this problem …i gave up….at least now…i can know what to do…

  5. 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.

  6. zaki says:

    Yes, blogjer on NetKL

  7. zaki says:

    You’re rite, type error.

    Cool!! Hope you like it

  8. zaki says:

    Hehe, I learn from mistakes too

  9. KNizam says:

    cool precaution. i will need this some time if affected :)

  10. shaz says:

    dun play2 with .htaccess hehe..
    luckily your blog is okay now…

  11. catzer says:

    it happen to me today.. :p luckily it just blog experiment during tutorial.

  12. megat says:

    Thanks for the info! Great! At least here i have info for that problem.

  13. zaki says:

    It’s the hosting company who play2, hehehe

  14. Campy says:

    Nice info. Thanks!!!

  15. Reyality says:

    Thanks a lot for the info… it was very helpful!

  16. zaki says:

    Sure, you’re most welcome. Hope to see you again

  17. 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

  18. infocity says:

    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

  19. Shingo says:

    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.

Trackbacks/Pingbacks

  1. From Blogger.com to WordPress.org at zakiyamani.com
  2. February 08 round up post at Blogjer is about bloggers

Leave a Reply




Search Blogjer