After putting the site into production mode and running the compiler, the site just loads a blank white page. I've tried disabling all third party modules and it has not helped. I have all error logging enabled, but nothing is logged. I've narrowed it down to something in the generated metadata, as deleting that folder gets the site working again. I've struggled with this for the past couple days and I'm at a loss. Anyone have any clue?

Here is the source for the blank page that is displayed:

<!doctype html>
<html lang="en">
<head >
    <meta charset="utf-8"/>
    <meta name="robots" content="INDEX,FOLLOW"/>
    <link  rel="icon" type="image/x-icon" href="https://xxx.xxx.xxx.xxx/pub/static/version1519935733/frontend/_view/en_US/Magento_Theme/favicon.ico" />
    <link  rel="shortcut icon" type="image/x-icon" href="https://xxx.xxx.xxx.xxx/pub/static/version1519935733/frontend/_view/en_US/Magento_Theme/favicon.ico" />
<body data-container="body" data-mage-init='{"loaderAjax": {}, "loader": { "icon": "https://xxx.xxx.xxx.xxx/pub/static/version1519935733/frontend/_view/en_US/images/loader-2.gif"}}' class="cms-index-index page-layout-1column">

Magento 2.2.2

  • 1
    add error_reporting(E_ALL); ini_set('display_errors', 1); to index.php file and check error log file located in var folder May 1 '18 at 11:52

Just follow : to debug blank white screen and CSS,JS page load design issue.

  1. open terminal run following command

cd magento-root-folder php bin/magento setup:upgrade

then don't compile just deploy

php bin/magento setup:static-content:deploy


php bin/magento indexer:reindex

Make sure “rewrite_module” on your production server.

chown -R www-data:www-data /var/www/html/magento2

check & set file permission also

'chmod -R 777 /var/www/html/magento2'

delete all from var/cache

  • 2
    chmod -R 777 /var/www/html/magento2 ... seriously?
    – Ejaz
    Feb 20 '20 at 13:52

after setup:di:compile - all page blank

I have the same problem. If you are 2.2.X, go to /generated/metadata, rename global.php to for example global1.php and it should be work again.

It is not a solution. Just to share the hints.

Try to use multiple version 2.2.2, 2.2.3, even 2.3 Develop - Clean install, setup:di:compile - blank page

And I am using Macbook Pro in windows 10 (I am not sure if this is a problem and PHP 7.1.15


I had the same issue and this happens because of folder permissions..

You need to give pub folder rights permissions, on Linux

chmod 775 -R pub
chmod 775 -R var
chmod 775 -R generated

the -R means recursive, it will affect also sub folders and files.


Please make sure that you don't have versioning issue. Some time when you delete static folder from pub then it will re-create.

So please check your static folder have the .htaccess and deployed_versions.txt file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.