Call Us! [visitorlocation]
Call Us! [visitorlocation]

Need Help?

Our experts will login to your server within 30 minutes to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

Magento install error 500 – Here’s how we identify and fix this problem

Most web hosts provide one click installation for Magento application.

It looks quite easy! But, sometimes, it may behaves weirdly and throws error.

One such error is 500 error during Magento install.

At Bobcares, we help website owners solve such errors as part of our Dedicated Support Services.

Today, let’s discuss the top 5 reasons for this error and how we fix them.

Magento install error 500 – How we identify?

500 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 it. If not, it can be a problem on the server side.

So, our Support experts primarily check the server error logs to get some information about this error. Further, to get more information on this error, we enable Developer mode. For example, in Magento 1, we uncomment the following lines in Magento bootstrap file(index.php).

Mage::setIsDeveloperMode(true);
ini_set(‘display_errors’, 1);

 

Similarly, in Magento 2, we use the below command to enable developer mode.

php bin/magento deploy:mode:set developer

 

Magento install error 500 – Causes and Fixes

Now, let’s see the major reasons for Magento install error 500 and how our Dedicated Engineers fix them.

1) Permission issues

One of the most common reasons for Magento install error 500 is the inappropriate permissions of the Magento files. Customers usually get 500 internal server error while accessing the Magento admin panel or the Magento connect manager. This is because, the default permission of the index files after Magento installation will be 664. Some systems won’t accept these permissions and throw this error.

 

Solution

Our Support Engineers assign proper permissions to the Magento files and folders. In cPanel, we change the permissions from Filemanager > Permissions.

 

magento install error 500

How to change file permissions from cPanel?

 

Most importantly, we change the permissions of the index.php file in Magento root folder from 664 to 644. In addition to that, we ensure that the permission of the file downloader/index.php is 644. Otherwise, Magento Connect Manager will throw 500 error.

Further, we make sure that the following folders also have appropriate permissions.

app/etc
var
media

 

In case if we need to change the permission of multiple files, we use custom scripts to change all at once. For example, to change the permission of files and folders to 644 and 755, we use the below scripts.

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

 

Alternatively, we use Magento Cleanup utility(https://yourdomain.com/magento/magento-cleanup.php) to automatically set correct permissions for the Magento installation.

[Are you confused about setting file and folder permission on your Magento application? Our Support Experts can help you here.]

2) Missing modules

Similarly, another common reason is that the hosting server doesn’t support some of the Magento specifications needed to complete the installation. In other words, missing modules or extensions needed for installing Magento can lead to this error.

For example, one of our customers reported the following error during Magento installation.

/home/xxxxx/public_html/.htaccess: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration

 

When we checked, the Apache module mod_env was not installed on the server that caused the problems. Similarly, another common mistake that we see is missing mod_version Apache module which is required for Magento 2.2 and 2.3. Also, missing Curl extension can throw 500 internal server error.

 

 

Solution

Our Support Experts primarily check the server software requirements for the Magento installation. This helps us to identify the missing modules or extensions.

For that, we use the Magento Check tool(https://yourdomain.com/magento/magento-check.php). It identifies the problems that is hindering the Magento installation. And, if we find any missing modules or extensions, we’ll install them on the server.

For example, in cPanel servers, we enable the Apache Modules from EasyApache4 > Apache Modules. Alternatively, we confirm the required modules are loaded from the httpd.conf file.

Moreover, we ensure that Curl extension is installed on the server. For example, on Ubuntu server, we install it using the below command.

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

 

[If you suspect missing modules on your server? Our Server Experts can fix it within minutes.]

 

3) Insufficient resources

Sometimes PHP errors may also lead to 500 internal server error. Magento is a resource hungry application and this error can pop up when the server or the user’s account lacks resources to run Magento. For example, insufficient memory or low execution time set for the account can often create problems.

That is, most of the web hosts set the default memory limit as 20MB, 32MB, 64MB, etc. But, this won’t work for Magento websites. So, a sensible memory allocation is 256MB.

Similarly, the default timeout value may be 30sec, 60sec, 90sec, etc. Sometimes, the Magento application takes longer time to produce the output and terminates with this error.

Solution

In such cases, our Dedicated Engineers tweak the PHP configuration of the domain accordingly. However, the steps to modify the PHP configuration depends on the hosting environment.

For example, in cPanel servers, we change the memory_limit from cPanel > Select PHP version > Switch to PHP options > PHP selector. Similarly, we can increase the max_execution_time and max_input_time from here.

 

magento install error 500

How to increase memory_limit from cPanel?

 

However, in some servers we add the PHP directives to the .htaccess file as shown below.

php_value memory_limit 256M
php_value max_execution_time 1800
php_value max_input_time 1800

 

But, keep in mind that increasing these PHP parameters is a complex process. Because, higher values are always favorable for hackers to run malicious scripts. So, our Server Experts always ensure that the above parameters are tweaked to optimum values.

[Frequent resource outage issues on your account? Click here, our Experts will check this and fix it for you.]

4) Invalid .htaccess entries

This commonly happens when customers try to install a component such as themes, plugins, patches, etc. in Magento. Wrong settings in .htaccess file can block the installation of new components. For example, syntax errors, URL rewrite errors, typo errors, etc. in .htaccess can create problems.

 

Solution

Firstly, our Support Engineers check whether .htaccess is creating problems by temporary renaming the file. In addition to that, we check the web server error logs(/var/log/httpd or /var/log/apache2) to see if any errors are logged there. If any problems are noted, we locate and correct the misconfiguration.

 

5) Maintenance mode enabled

Sometimes, users enable Maintenance mode on the Magento application when performing new updates. This stop visitors from accessing the site when it’s being updated. Also, maintenance flag changes the permission of the index.php file to 666 which makes it unable to execute by web browsers.

But, we’ve seen instances where Magento fails to reverse the permissions of the index.php or remove the maintenance.flag. It can be due to resource outages, interruptions, etc. This can further create problems and throws 500 error.

 

Solution

In such cases, our Support Experts remove the maintenance.flag from Magento’s root folder and restore the permissions of the index.php file. Similarly, on Magento 2, we remove the file var/maintenance.flag to disable the maintenance mode.

[Need an Expert to look into this Magento install error? Click here to get your problem fixed permanently.]

Conclusion

In short, Magento install error 500 can occur due to wrong file permissions, missing server modules and more. Today, we’ve discussed the top 5 reasons for this error and how our Dedicated Engineers fix them.


PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

Submit a Comment

Your email address will not be published. Required fields are marked *