How to fix Magento 2 admin blank login page issue?

The white screen of death can signify there is an issue that you can get after Magento 2 update or new plugins installation. 

By the way, if you're not sure in your technical skills for installing a new extension, use our installation service. Our development specialists with 11+ years of experience will be happy to make this work for you and assist you in setting up an extension on your Magento.

What complicates the case even further is that there are multiple reasons for the Magento-admin-login-blank-page error. So the very first thing to do to solve the problem is to find out where it is located. For this, go to app/bootstrap.php and uncomment the line (delete the # symbol) #ini_set('display_errors', 1).

After this, you will see the error message instead of the withe page. Also, it may be useful to check exception.log and system.log to get more details about the error.

Let’s see the most common reasons for the Magento 2 white page issue.

PHP memory limit

If you have many plugins, heavy traffic, multi-functional custom theme, and other components that require a lot of PHP memory, it may happen that when you try to access your Magento admin panel, you get a blank screen. Check the server settings and increase the memory limit in files php.ini, .htaccess, or in the index.php. If you can edit server configurations, open the php.ini and set memory limit 756M with the following command:

ini_set('memory_limit', '756M');

Otherwise, you can specify the memory limit in the .htaccess file.

Permissions issues

Sometimes you can get a blank page in Magento because of wrong permission for the var/ directory. Caching files and auto-generated classes are stored in this folder. Magento recommends setting 755 permission for directories. This permission type gives full control for the user, and everyone else can only browse folders. And for these files, it’s better to use 644 permission.

For more information about Magento permissions, please check the official documentation.

System requirements

Sometimes you can get a blank page right after Magento 2 installation. Usually, it means that you miss some system requirements, for example, if you try to install Magento on Windows OS, you will get a blank page. There are some ways you can hack the code and install Magento on Windows, but they all are risky, and we don’t recommend trying them.

Below is the list of the main technical requirements for Magento 2:

  • OS: Linux x86-64 or Linux distributions like Ubuntu
  • Memory: 2GB of RAM
  • Servers: Apache 2.4 or Nginx 1.x
  • MySQL 5.6, 5.7
  • PHP ~7.2.0 or ~7.3.0

For more detailed info, go to Magento official documentation.

How can we help you?

Didn’t you find the answer to your question? We are always happy to help you out.

© 2009-2024 Amasty. All Rights Reserved.