How to install Magento 2 if installation stops

- Fire development, Magento 2

Magento 2 export CLI

Users argue that the Magento 2 installation may stop at about 70%. It happens only when you use the Setup Wizard. How to solve the issue and install Magento 2? Below, we share some essential tips that tend to fix the problem and let you continue the process. You can discover other useful tips in our cookbook.

'

The Issue

It doesn’t matter whether you use sample data or not. The installation may stop at 70% regardless of this aspect. Furthermore, no errors display on the screen that often compels Magento 2 users to wait. However, nothing happens.

The two potential causes for this issue are the PHP setting for max_execution_time and timeout values for Nginx and Varnish. Let’s see how to solve the problem.

The Solution

Below, we explore three possible ways to handle the problem.

Varnish + all web servers

Follow these six step to fix the issue:

  1. First of all, you have to locate your php.ini. Using a phpinfo.php file.
  2. Now, you have to login as a user with root privileges. After that, open the php.ini file in a text editor.
  3. The third step is about locating the max_execution_time setting.
  4. Now, when you see the setting, specify a new value for it: change the existing one to 18000.
  5. After that, you can save the php.ini file and close the editor.
  6. Finally, it is possible to restart Apache.

If you are not familiar with how to perform the last step, use the following command for CentOS: service httpd restart. If you are an Ubuntu user, do the following: service apache2 restart.

However, it is not the end of our guide. In case you use Nginx or Varnish, it is necessary to perform a few more configurations before you can run the Magento 2 installation entirely.

Nginx

For Nginx, you can use the included nginx.conf.sample. Alternatively, it is possible to configure timeout settings in the Nginx host configuration file. Apply the following changes to the location ~ ^/setup/index.php section as follows:

Now, you can restart Nginx. Use the following command:

Varnish

Now, let’s explore a case when Varnish is utilized. You have to edit default.vcl. Find the backend stanza and add a timeout limit value to it. Use the following code snippet:

To restart Varnish, use the following command:

For further information on how to install Magento 2, if installation stops at about 70%, follow this link: Installation Stops. Also, check our guide to the Magento 2 installation.

'