Magento 500 internal server error: Definition and how to fix it in Magento 2

Magento 500 internal server is a common error in hosting environments. And that leads to the hiding of PHP errors and the client is forced to access the admin system to report the error. If this error is not fixed soon, it can cause traffic loss and directly affect the user experience.

If this is the first time you are facing Magento error 500, please read to the end of this article, we will help you fully understand this problem.

I.What is Magento error 500?

Magento internal server error is a generic error code. It means that something has gone wrong, but the server couldn’t identify it. Some of these errors may be temporary and just disappear when you refresh them. If not, it can be a problem on the server-side.

II – The Causes Of Magento error 500

There can be many reasons behind this error. However, Magento error 500 can originate from one of these most common reasons: permission issues, memory limitation and issues in the htaccessfile.

1. Permission issues

Magento permission issue

One of the most common reasons for Magento 500 error is misconfigured Magento file permissions. People often encounter this error when accessing the Magento admin dashboard or Magento connection manager. This is because the default permissions of the index files after Magento installation will be 664. Some systems won’t accept these permissions and then show this error.

2. Memory limitation

This is another common reason that can lead to Magento error 500 after you upgrade data. Magento is a resource-wasting application. Moreover this error can arise when the server or user’s account does not provide enough resources to run Magento.

However, it is not the same in Magento sites. So a reasonable memory allocation is 256MB. Sometimes Magento application takes longer to return output and ends up with this error.

3. Issues In The . Htaccess File  – Magento error 500

Magento Issues In The . Htaccess File

Issues in the .htaccess file commonly occur when you try to install some components such as themes, plugins, patches, … in Magento. Wrong configurations in .htaccess file can block the installation of new components.

4. Insufficient resources – Magento error 500

This error can appear when the server or user’s account lacks resources to run Magento. Most web hosts set default memory limits of 20MB, 32MB, 64MB, etc. However, this will not work for Magento sites. So a reasonable memory allocation is 256MB.
Similarly, the default timeout value can be 30 seconds, 60 seconds, 90 seconds, etc. Sometimes Magento application takes longer to generate output and ends up with this Magento error 500.

III. How To Fix Magento error 500?

Magento 500 error can negatively hurt your website’s ranking if it persists for hours. For each reason leading to error, there will be a relevant solution to fix it.

Change Magento File Permission

It’s common to see Magento error 500 when logging to the admin panel. To fix it, access the file manager of your Magento website and adjust the permission of index.php file in root from 664 to 644.

You should also change the permission of another index.php file located in downloader/index.php to 644

Increase value memory 

Sometimes, the Magento error 500 may appear on a specific page of your website when your server lacks the resources to run Magento. It’s recommended for a store with around 500 products, to have at least 256M for php_memory_limit value. There’s no difficulty in checking this value via .htaccess file or php.ini file.

Since hosting is not allowed, you may not be able to do it yourself. So, you can ask your hosting provider for help or you can choose a hosting from this list of best optimized Magento hosting to avoid lack of resources.

So, If you are looking for a partner to implement ecommerce solutions?

Let’s ArrowHitech help you!

Best of all, with over 14 years of experience, we can provide the best Magento solutions and services for your business on many levels.

ArrowHitech services for ecommerce security

Rename or Remove .Htaccess File 

If you suspect that issues in the .htaccess file caused the Magento 2 on your website, try renaming the .htaccess file to check.

After that, check the error logs in /var/log/httpd or /var/log/apache2. However, if there are other issues arising, you must recover the configurations. 


As mentioned, Magento error 500 is a common error. So we shouldn’t be scared when we see this error message. What you need is to avoid confusion, identify the cause, and come up with the right solution.

And don’t forget that ArrowHitech can also help you with other problems with our Magento development services. So, if you have any questions, don’t hesitate to contact us HERE.