How do I fix a Magento 2 blank white page with no error message?
A Magento 2 blank page with no error message almost always means PHP crashed with a fatal error. To fix it, read var/log/exception.log and your PHP-FPM error log first. If both are empty, switch a staging copy to developer mode so the error prints on screen. Once you can read the error, the message points to the file, module or setting behind it.
Applies to Magento 2.4.x (Adobe Commerce and Magento Open Source).
Quick answer
Production mode hides PHP fatal errors, which is why a Magento 2 blank page shows no error. Find the error in var/log/exception.log, var/log/system.log, var/report/ or the web server’s PHP error log. When those logs are empty, developer mode or ini_set('display_errors', 1) in app/bootstrap.php prints it on a staging copy. Most cases trace to an exhausted PHP memory_limit, a broken third-party module, stale generated/ files or wrong var/ permissions.
Why Magento 2 shows a blank page with no error
Adobe Commerce and Magento Open Source both show their own error page for most exceptions. That page reads “There has been an error processing your request.” If PHP dies before Magento can render that page, the server sends back an empty response. Open the network tab in your browser’s dev tools and check the status code. A 500 points to a PHP crash. A 200 with an empty page usually points to a layout XML or theme problem instead. Switch to the Luma theme on staging to confirm it.
Before you debug a Magento 2 blank page on a live store
- Never leave display_errors switched on for a public store. Raw errors can expose file paths and database details.
- Back up app/etc/env.php and the database before running setup:upgrade on production.
- Enable maintenance mode with
bin/magento maintenance:enablebefore rebuilding, so shoppers never land on a half-compiled site. - Note the last change: an extension install, a Composer update, a PHP upgrade or a server move. That one detail can narrow a Magento 2 blank page down before you open a single log.
Steps to fix a Magento 2 blank white page
Work through the triage in this order: status code, logs, developer mode on staging, then the server itself.

1. Check Magento’s exception log and server error logs
First, check whether the Magento 2 blank page hits the storefront, the admin, or a single page type. Then run these from the Magento root:
tail -n 50 var/log/exception.log
tail -n 50 var/log/system.log
ls -lt var/report | head
Also check the PHP-FPM and Nginx or Apache error logs. Their location depends on your host, but /var/log/nginx/error.log is a common path. If PHP fails before Magento loads, PHP writes the error to these server logs and nowhere else.
2. Turn on developer mode or display_errors to show the error
If every log is empty, make PHP print the error. On a staging copy, switch to developer mode, which displays uncaught exceptions in the browser:
bin/magento deploy:mode:set developer
Adobe’s operation mode documentation recommends clearing generated/code and generated/metadata first when you move from production to developer mode. For errors that fire before Magento boots, open app/bootstrap.php and remove the # in front of ini_set('display_errors', 1);. With either change in place, the Magento 2 blank page turns into a readable error message on staging.
3. Common Magento 2 white screen errors and their fixes
Match the error text from your logs to this table.
| Error text in the log | Cause | Fix |
|---|---|---|
| Allowed memory size of … bytes exhausted | PHP-FPM memory_limit is too low | Raise memory_limit in the php.ini that PHP-FPM loads. Adobe recommends 2G of PHP memory for a single-server store. |
| Class … does not exist, or Interceptor errors | Stale generated code after an upgrade, deploy or module change | Clear generated/code and generated/metadata, then rerun setup:di:compile. |
| Fatal error in app/code or vendor/ | A broken third-party module | Run bin/magento module:disable Vendor_Module, then setup:upgrade. |
| Permission denied | The web server user can’t write to var/, generated/ or pub/static/ | Reset ownership to the file system owner. |
| Parse error after a server change | A PHP version your Magento release doesn’t support | Match PHP to Adobe’s system requirements for your version. |
| Admin blank on Windows localhost, Magento 2.2.7 or 2.3.x | A path check bug in vendor/magento/framework/View/Element/Template/File/Validator.php | Upgrade Magento instead of editing vendor/ code, which Composer overwrites on the next update. |
The PHP CLI can load a different php.ini, so php -i may not match PHP-FPM.
4. Rebuild generated code and flush caches
rm -rf generated/code/* generated/metadata/*
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:flush
Add -f to setup:static-content:deploy if the store is not in production mode. Then restart PHP-FPM so OPcache drops any stale compiled files. The service name varies by PHP version, for example php8.2-fpm.
5. Switch back to production mode
Once the page loads, add the # back in front of ini_set('display_errors', 1); in app/bootstrap.php. Switch back with bin/magento deploy:mode:set production, then run bin/magento maintenance:disable.
What to check if the Magento 2 page is still blank
If Magento’s logs stay empty after rebuilding generated code, look below Magento. Check disk space with df -h, since a full disk can produce a Magento 2 blank page without writing to any log. A crashed PHP-FPM pool can also return an empty page. Confirm it is running with systemctl status php8.2-fpm, swapping in your PHP version. If you can’t reach the server-level logs yourself, our Magento development team can trace the cause from there.
Related Answers
Still need help?
Talk to our Magento experts
Still looking at a white screen after checking the logs and rebuilding? Send us the error and we’ll help you trace the cause.