Magento 2 CMS is a suitable platform to run E-commerce business and it can be administered via admin panel. Admin is responsible for the functionalities of the store and any error in the admin panel is not acceptable. However, the clients have been facing the issue of the blank page in the admin panel after upgrade or installation of Magento 2.2.7 and Magento 2.3!
Developers at Meetanshi have been solving this issue and decided to post it as a solution for all the store owners of Magento 2.2.7 and Magento 2.3.
If you have recently upgraded or installed the latest version and face the Magento 2.2.7 and 2.3 admin page blank issue as shown below, follow the solution given in the post.

Solution to Magento 2.2.7 and 2.3 Admin Page Blank Issue:
How to solve the Magento 2.2.7 admin page blank issue:
Navigate to: /vendor/magento/framework/View/Element/Template/File/Validator.php:113
You’ll find this code:
protected function isPathInDirectories($path, $directories) { if (!is_array($directories)) { $directories = (array)$directories; } foreach ($directories as $directory) { if (0 === strpos($this->fileDriver->getRealPath($path), $directory)) { return true; } } return false; }
which is to be replaced with the following code:
protected function isPathInDirectories($path, $directories) { $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path)); if (!is_array($directories)) { $directories = (array)$directories; } foreach ($directories as $directory) { if (0 === strpos($realPath, $directory)) { return true; } } return false; }
How to solve the Magento 2.3 admin page blank issue:
Navigate to #/vendor/magento/framework/View/Element/Template/File/Validator.php:114
Find the below string:
$realPath = $this->fileDriver->getRealPath($path);
and replace it with:
$realPath = str_replace('\', '/', $this->fileDriver->getRealPath($path));
Is’nt the solution easy to implement? So now you can upgrade to Magento 2 latest version without any issues!
Happy Administrating!