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.
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_timeand 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:
First of all, you have to locate your php.ini. Using a phpinfo.php file.
Now, you have to login as a user with root privileges. After that, open the php.ini file in a text editor.
The third step is about locating the max_execution_time setting.
Now, when you see the setting, specify a new value for it: change the existing one to 18000.
After that, you can save the php.ini file and close the editor.
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:
1
2
3
4
5
location~^/setup/index.php{
.....................
fastcgi_read_timeout600s;
fastcgi_connect_timeout600s;
}
Now, you can restart Nginx. Use the following command:
1
service nginx restart
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:
1
2
3
4
backenddefault{
.....................
.first_byte_timeout=600s;
}
To restart Varnish, use the following command:
1
service varnish restart
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.