How to Solve Magento 500 Internal Server Errors

How to Solve Magento 500 Internal Server Errors

Many users encounter some weird Magento 500 Internal Server Errors (Error type 500). I will try to list the most common solutions. These errors are not always caused by the same reason. You should try to take a look at your server’s error logs to get some help about this error.

You can get additional info about the errors by Turning on Developer Mode. Look in the Magento bootstrap file (index.php), you’ll see lines similar to the following

#ini_set(‘display_errors’, 1);

Uncomment these. In a production system, you’d never want to have your errors display to the browser, but while developing having an errors and warnings thrown immediately in your face is invaluable. This way, you will see the actually problem which lead to the Internal Error Server. In almost cases, the reason is that there is an exception throw after output is sent to browser.

Solution #1

This error might be caused because you have not set the correct permissions for the magento folders. To solve this go to File Manager and then change the file permission of index.php file from 664 to 644.  Also change the permissions of downloader/index.php file to 644 as well otherwise when you will try to access System > Magento Connect >Magento Connect Manager (after magento installation) by logging to magento admin,  you will get 500 Internal Server Error.

You can also try this tool, it’s a magento cleanup utility. It will set the correct permissions for your complete magento installation:

  1. Download it
  2. Unzip magento-cleanup.php to the root directory of your magento installation
  3. Browse to

Solution #2

Your server does not support some of the magento specifications. You can easily test this using the magento check utility. Follow the steps below to check your server’s software, if there is an incompatibility this utility will show it.

  1. Download it
  2. Unzip magento-check.php to the root directory of your magento installation
  3. Browse to

Solution #3

If you are getting weird 500 internal server errors on specific pages of your site, it might be a matter of resources. I was getting internal server erros on some product pages and on the I found out that the .htacess file of my magento installation was somehow reset and the php_value memory_limit value was set to 32M as soon as I raised it, the internal server errors vanished! You should use at least 256M for over 600-700 SKUs. Magento is very resource hungry and it is easy to get these kind of errors if you try to save some bucks from the hosting.

Solution #4

Htaccess file which is located at Magento root folder. It will be this case if you meet Internal Server Error on every page. Try to remove it for testing purpose
If your website was running file for a long time, then it must be a change at Server side, just submit a ticket to Hosting Company.

Solution #5 (Comment from Huberto)

If the curl extension is missing you can get 500 Internal server error. You can install it using the command below:
apt-get install curl libcurl3 libcurl3-dev php5-curl

Panagiotis Tzamtzis is the founder of TechJam. You can reach him on Twitter, LinkedIn, Facebook, Google+


  • Mohsin - 20/11/2012

    Your first solution worked 4 me.

    • Chris - 16/11/2014

      Yes, it worked, using Solution #1.

      As I am a amature running Magento, I did a backup database from System>Tools>Backup> Database and Media Backup, after running that it went blank and the next thing I know, it appears Internal server 500.

      Lucky for this tutorial here, it’s up and running again. I was having cold sweat for the past few hours looking for solution and getting help.

      Never run the back up in the Magento itself.

      Kudos to TeachJam!

    • Brian - 08/12/2014

      Solution #1 worked for me!

    • rohatash rawat - 30/09/2015

      thanks for this , i have solved my problem by the file permisssion , i changed my file permission of the index file from 666 to 644. thnks you very much.

  • Salil Kalghatgi - 21/01/2013

    Solution 4!!!!!!
    I had magento running on a subdomain with Joomla on the main domain. tried all the database, memory, and permission configs, deleting the magento .htaccess worked like a charm. thanks a lot

  • ville - 16/02/2013

    Solution 4 work for me.

    I delete .htaccess file.

    Is there any reason to but it back to root folder? Does the website need it for some reason to to work?

    • TechJam - 16/02/2013

      Yes, the htaccess file is used to set php variables, permission settings and many other important stuff.

    • Anderson Possamai - 08/07/2013

      For me too! Magen CE 1.7

  • Humberto - 15/03/2013


    If the cURL extension is not installed, you receive an error screen 500 in admin.

    apt-get install curl libcurl3 libcurl3-dev php5-curl

  • Vinicius - 27/03/2013

    First tip of enabling error messages was the key to solve my problem. I would never figure out that I had to make the ENTIRE /var directory writable (including its contents). Magento Wikis and instructions doesn’t say that.

    • Cindy - 07/10/2014

      I had a problem where my website cannot be indexed by Google and returned error 500.
      The above comment worked for me. But can somebody PLEASE explain to me why merely enabling the error message fixed crawling error?


  • Tudor - 28/03/2013

    Thank you man! The solution with magento-cleanup tool worked like a charm.

  • Markus - 16/05/2013

    I have internal server error (500) when click for example on Google search on product url… but if I see the page product from site from categories and then to click on the same product and the same url.. the url product page is ok.. The magento site is in multistore, the rewrite url is active, the php_value memory_limit is to 256 MB.. The is on external click of url but only the product url:, the click on page url not direct for example is ok. The canonical option is active. Can you help me?

    • TechJam - 16/05/2013

      if you want you can send a couple of actual links with this to my email and I can try to take a look 😉

      • anil - 29/05/2013

        hello !
        I had install magento alpha version ,after using it for 30 min ,
        I am facing some problem after clicking the manage category option in catalog ,on clicking the manage category the next page which is supposed to be manage category page where we can add ,edit the category will come but i found some other kind of stuff …this stuff contains a page with field like…page 1 of pages

        • anil - 29/05/2013

          i have a snapshot of that other page please help to get over this error

          • TechJam - 31/05/2013

            Hi, I’m not sure what your problem is. if you send me a url I can take a look…

  • deko - 23/05/2013

    Cleanup tool worked like a charm

  • Matthias - 27/09/2013


    got the same issue on the downloader.
    For me the solution was a to high memory_limit. I think suhosin don’t like it. So I reduced the memory limit to 1024M and everything works.


  • Dan - 29/09/2013

    Thank you man. You helped me a lot.

  • Gerardo - 30/09/2013

    Hello, like everyone else in this post im stuck on that 500 internal server error. Last weekend i add my paypal account info, and everything was great. Like 1 hour after that i was changing some .cvs fiiles and then the nightmare started.

    Every time i try to buy something everything is ok until my shopping cart webpage, once there when i press the PROCEED to CHECOUT, i get this error.

    Fatal error: Class ‘Mage_Checkout_Controller_Action’ not found in /var/www/vhost/ on line 29

    I have magento, and well, if anyone here have an idea about what to do i want to thank you in advance. o.o /

  • pritesh - 19/10/2013

    thanks solution1 saved my day..thanks a lot buddy

  • Glenio de Lima Teodosio - 26/11/2013

    1ª Solução perfeita. Parabéns e obrigado !

  • kiran - 27/12/2013

    great article,very help full , thank you for Solution #1 🙂

  • Marcelo Rocha - 31/01/2014

    Thank you very much! The permission tool works greatly!

  • Ilian - 24/02/2014

    Thanks! very help full , thank you for Solution #1

  • Leonardo Oliveira - 05/03/2014

    Thanks! You saved my neck with this solution!

  • Timeout - 07/04/2014

    Hey there, thanks for the fixes. Many 500 Internal Server Errors occur if you have some files missing. I’ve met alot of these 500 Errors, and most of the time there were a files missing.

    Check your app/code/core folder for missing files, this often helps!

    Thanks for the file which fixes the permissions. Helped for me!

  • Dan - 20/05/2014

    Hi, thanks for this article. I in the first solution you suggest changing permissions for the downloader/index.php I changed the perms to 0644 form 0777, and I cleared the Magento Cache, but I still get the 500 error when trying to access the Magento Connect Manager, this is the only error message I get.

    Is there anything else I can do to try and clear this issue, I really need to install an extension, and I cannot do this until I get the Magento Connect Manager working…any ideas would be warmly received.

    • Dan - 21/05/2014

      I have now managed to solve the problem for myself. Although I got the exact answer from another source, this article prompted me to look in the right place, so thanks for that. 🙂

      • TechJam - 22/05/2014

        I’m glad this was helpful 🙂

  • Dan - 21/05/2014

    Looks like someone has stolen your article….

    • TechJam - 22/05/2014

      Thanks for the heads up Dan. Although it would have been nice to refer the original link 🙂 It’s fine. Let’s share the knowledge 🙂

  • - 07/06/2014

    Good replies in return of this matter with solid arguments and explaining
    all concerning that.

  • Bhushan - 21/06/2014

    A great post. Thanks man.

  • SPH - 02/08/2014

    I am so happy i came across your solutions… i was just having 500 errors all the time and i was sick of it.
    Thank you so much!!

  • Sarfaraz - 07/08/2014

    Hi Dear

    I am new to mangento, and face problem of exporting 4499 products via system, dataflow, export all product but get 500 error.
    I check many solution but did not work for me. kindly let me know what is problem

    reply me please on


  • Michael Bos - 18/08/2014

    I really like this and it has helped me during some of my troubleshooting sessions. Especially Solution 3 & 5 where head breakers I forgot.

    Do you mind If I translate this to Dutch and put it on my site?

    Thank you,

    • TechJam - 22/08/2014

      No problem. Just mention the URL as the source 🙂

  • David P - 02/09/2014

    Thanks so much for this post – solution 1 worked a treat!

  • jagadish - 24/09/2014

    Thanks . This post was really helpfull. Keep posting.

  • Nirav Sheth - 31/10/2014

    Pretty much valuable info! Solving Magento 500 internal server errors, explained in such easy-to-understand dialects; explanation given on is much detailed as well; appreciate it.

    Reasons behind it are not same all the time; seeing the server’s error logs can certainly be a big help to us; yes finding some anonymity; great!

  • Syed Kazmi - 01/12/2014


    I just installed latest magento version and testing it at the moment. I am getting 500 internal server error on almost every step on both frontend and backend.
    I applied all the above solutions but could not get sorted the issue and now looking for your help. Please help me to resolve the issue and I will be really thankful to you.

    Many Thanks

  • mostafig - 11/12/2014

    solution 2 is great.

  • Ehab mohsen - 27/12/2014

    thanks alot you saved me!!

  • Karthik - 05/01/2015

    Solutions 1 is working fine for me.


  • nash - 29/01/2015

    i got the error on product pages which use “custom option” only. I have applied everything as above but still same. Please help me. thank you.

    You try these link which have “custom option”

  • Justin - 04/04/2015

    The .htaccess solution willl not help if the server settings are lower than you choose.

    you should all learn more about m2e pro if you really want to start making the most of magento

    the way to dump your DB the fast way is

    mysqldump -u root -p MAGENTOdbNAME > ./mg.sql

    then import like this

    mysql -u root -p NewMAGENTOdbNAME < ,/mg.sql

  • Michael Bay - 04/04/2015

    just been sent here by my developer, thanks solution 2 worked for me. Great post

  • fadi - 21/04/2015


    I tried all solutions but it dosn’t work.

  • deepika - 11/07/2015

    no solution worked. plz help
    when i select any page i’m getting

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator and inform them of the time the error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.
    Apache Server at Port 80

  • Roel - 12/07/2015

    This worked for me:

    In .htaccess file I commented out the SecFilterEngine and SecFilterScanPOST in the mod_security section:

    # disable POST processing to not break multiple image upload

    # SecFilterEngine Off
    # SecFilterScanPOST Off

    Give it a try…

  • deepika - 13/07/2015

    i tried bt i’m getting same error! help!

  • Jay - 23/07/2015

    The solution No.1 solved my issue. Thank you a lot.

  • Tavva - 30/07/2015

    Solution 1 works super…

  • jan - 06/08/2015

    solution #4 worked for me, completely forgot about the htaccess file. another thing I had to do was reindex via shell as unable to access admin, that could be added as a possible solution to solve problems too.

    • TechJam - 06/08/2015

      Can you please share with me a few details on the steps you followed to re-index the via shell? I would love to add this in the original article.

  • Padmini - 26/08/2015

    Dear Sir,

    As I am a amature running Magento, I did a backup database from System>Tools>Backup> Database and Media Backup, after running that it went blank and the next thing I know, it appears Internal server 500.
    So pls tell me magento installation file means which file

  • Bhavesh - 21/09/2015

    Solution #3 works for me, I was getting error on loginPost page, its shows blank page and by checking on firebug its shows 500 internal server error,

    my memory limit was already set to 512M and I increased it to 1024M and I got it working.

    I am not sure why too much memory, as I don’t have that much products on my site may be few hundred.

    but have got it working thanks. 🙂

  • Jim Fisher - 03/10/2015

    Thank you, thank you, thank you!

  • akash - 05/10/2015

    Yes, Solution #1 is worked for me

  • Jorge - 12/10/2015

    Solution #1 solved my issue. Thank you!

  • Whosayen - 26/10/2015

    Hi, Solution 3 worked for me. Thanks you !

  • livedub - 30/10/2015

    1st solution magic thanks for sharing 🙂

  • Radhika Banga - 10/12/2015

    First solution worked for me.

    Thank you very much

  • Elmer - 28/12/2015

    Just in case!
    I fixed doing this on debian (ubuntu will be the same)
    sudo apt-get install php5-mcrypt
    sudo php5enmod mcrypt
    sudo /etc/init.d/apache2 restart

  • Dave - 29/12/2015

    If you are running Magento on an Nginx solution, check the /etc/lib/nginx and /etc/lib/nginx/tmp folder permissions.

  • Kabir - 25/01/2016

    It helped me a lot…..thank you!

  • Roshan - 16/02/2016

    Solution #1 is working
    thanx a loooot

  • Ricky - 24/02/2016

    I had a Error 500 as well and took forever to find the problem but I fixed it by doing the following (not sure why it worked but it did 🙂 )

    Go to your Cpanel and change the PHP version (my case from 5.4 to 5.5) and then change it back. Reload the website and Bingo!

  • Sean Scott - 08/03/2016

    If you are moving from a live to dev, also check your local.xml. I had memcache and redis running and had to remove and take to a stock layout.xml to work.

  • mmr - 18/03/2016

    I tried to take backup from admin area. Oh! then it was showing error message ” internal server error”. I wasted my few hours from my outsourcing work but fanally I solve with the of solution -1,

    Thanks for the post.


  • Chatty Sharma - 02/06/2016

    Thanks a lot. #1 solution worked for me 🙂

  • John - 09/06/2016

    Solution #1 did the trick! Thank you so much!

  • rahul - 05/09/2016

    Hi i just tried all steps non of them worked then as per a magento experts advice a friend of mine told me to go to includes/config.php

    at the end of the file you should see these 2 lines that are to be in same as given below

    #define(‘COMPILER_INCLUDE_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’src’);
    #define(‘COMPILER_COLLECT_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’stat’);

    in my case ” # ” was missing that made the compilation tool to not work so it gave the error HTTP 500 on my magento admin backend & frontend both i am using ver.

  • keobs - 26/09/2016

    Solution #1 did the trick! Thank you so much!

  • Alex Kiberev - 05/10/2016

    Solution #1 works for Error 500. Thank You, Guys!

  • Seang Kim - 18/10/2016

    I will try the following extension
    – magento-check
    – magento-cleanup

  • Jame Brown - 18/10/2016

    After I download file from #Solution 2, it show result like below:

    Congratulations! Your server meets the requirements for Magento.

    You have PHP 5.2.0 (or greater)
    Safe Mode is off
    You have MySQL 4.1.20 (or greater)
    You have the curl extension
    You have the dom extension
    You have the gd extension
    You have the hash extension
    You have the iconv extension
    You have the mcrypt extension
    You have the pcre extension
    You have the pdo extension
    You have the pdo_mysql extension
    You have the simplexml extension

  • CN - 24/10/2016

    I can’t get the magento-cleanup tool to work. The permissions aren’t set. How do I get this to work. I have direct admin acces but don’t have ssh-access available. What can I do to get this to work?


5 Trackbacks

  • How to Solve Magento 500 Internal Server Errors: | linuxcpanelsolutions - […] […]
  • 500 Internal Server Error in store page - MagentoHub - […] all the solutions suggested in this article as well as this […]
  • Magento 1.9 Error: Have I been hacked? * VPN SSL Online - […] have done the step by step verification recommended by a lot of sites, like this one:[][2] but it has…
  • Magento: There has been an error processing your request, Error log record number * VPN SSL Online - […] have done the step by step verification recommended by a lot of sites, like this one:[][2] but it has…
  • Magento error: Mage registry key "controller" already exists * VPN SSL Online - […] have done the step by step verification recommended by a lot of sites, like this one:[][2] but it has…

Leave a Reply