Magento 2.4 Blank Page After Install

0
218

Magento 2.4 blank page after Install complete solution with step by step in detail and explain in a very simple way. It is very easy to fix this solution.

There any many new users who working on the eCommerce websites using Magento that get stuck after installation. They get an error of blank screen after installing Magento 2.4 version. There are some steps you have to follow to fix this error.

Steps to solve Magento 2.4 blank page after install.

Magento 2.4 Blank Page After Install
Magento 2.4 Blank Page

With the help of the below steps, you can easily fix the error of getting a blank screen in Magento 2.x and 2.4.x after the successful installation.

In this, you have to make small changes in one of the important files called “validator.php”.

The path of the file where it is located is as follows.

It is inside the folder :

vendor-magento-framework-View-Element-Template-File-Validater.php

Your first step is to open this file name validator.

And goto line number near about 133 or you find with the function name given below.

$realPath = $this->fileDriver->getRealPath($path);

You have to replace the above code with the below code.

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

After doing changes you have to run the below command.

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

After execution of the above command, your blank page issue gets fixed.

If you get a Gd2 PHP Error during Magento 2 you can check with the Solution For Gd2 PHP Issue.

Conclusion: Using the above steps error of the blank screen error gets fixed. If you have any queries regarding this error please comment below.