Skip to content
Magento Development

Magento 2 Blank Page on Frontend or Admin: Find the Cause

A blank white page on an existing Magento 2 store, with no error page and no report ID, has a cause written somewhere. This guide starts from what the browser received, reads the right private logs, and maps the evidence to the usual causes: PHP fatals, generated code, static content, ownership, base URLs, OPcache, modules and JavaScript.

Blank browser window with an unplugged cable, a magnifier over a log, and a gear with a check leading to a working store page

Your Magento store was working, and now the storefront, the Admin or both show a blank white page. There is no Magento error page and no report number, just white. This guide is for that symptom on an existing installation. It starts from what the browser actually received, moves to the private logs that record the real failure, and then maps that evidence to the usual causes.

If the page says There has been an error processing your request and shows an error log record number, Magento did catch the error and wrote a report. That is a different starting point, covered in the guide to the error processing page and its report ID. Short answers about HTTP 500 responses are collected in the Magento 500 error FAQ.

Why a blank page has no report ID

When the HTTP application catches an exception outside developer mode, its exception handler logs it with a report ID and renders the error page from pub/errors/report.php. You can read this in the framework source, ExceptionHandler.php. Adobe's application modes reference confirms that in production mode, errors and exceptions are logged to the file system and never displayed to the user.

A blank page usually means one of three things happened instead:

  • PHP stopped with a fatal error that no handler could catch, for example an exhausted memory limit or a timeout. With display_errors off, which php.net says is required on production systems, the visitor sees nothing useful.
  • The HTML arrived, but the CSS and JavaScript it depends on did not, so the page looks empty.
  • The HTML and assets arrived, but a JavaScript error stopped part of the page from rendering.

Each of these leaves evidence in a different place, so work out which one you have before you change anything.

Step 1: Find out what kind of blank you have

Open the browser's developer tools, go to the Network panel, reload, and click the first request, which is the HTML document. Note its status code and response size. Then check the Console panel for red errors. From a terminal you can get the same first facts without a browser cache in the way:

curl -sS -o /dev/null -w '%{http_code} %{size_download}\n' https://www.example.com/
curl -sS -I https://www.example.com/admin_path/

Replace the host and the Admin path with your own. Neither command changes anything on the server.

What you seeWhat it usually meansRead first
Status 500, empty or almost empty bodyA PHP fatal error that Magento never handledPHP-FPM or PHP error log, web server error log
Status 500, plain text saying an error happened during application runMagento's bootstrap caught a PHP error and wrote it to the exception logvar/log/exception.log
Status 502 or 504 from nginx or ApachePHP-FPM is down, out of workers, or timing outWeb server error log, PHP-FPM log
Status 200, page source has HTML, nothing styled or visibleStatic files returning 404, often in production modeNetwork panel requests under /static/
Status 200, header and footer load, one area stays emptyA JavaScript error in that componentBrowser Console
Redirects repeat, then a white page or a browser redirect errorBase URL or secure URL settings that disagree with the real addressStore URL configuration
Admin login page works, white page after signing inAdmin assets, an Admin JavaScript error or a module fatal on the dashboardConsole first, then the PHP logs

The plain text 500 response comes from Magento's bootstrap, which terminates with that message when a PHP error escapes the normal handler outside developer mode. That behaviour is in Bootstrap.php.

Step 2: Read the private evidence, in this order

Look at the logs from the same minute you reproduced the problem. A blank page has a cause written somewhere, and the order below goes from the outermost layer inwards.

  1. The web server error log. On nginx this is set by the error_log directive; on Apache, by the site's ErrorLog. Upstream timeouts, refused FastCGI connections and permission denials on files show up here.
  2. The PHP-FPM log and the PHP error log. PHP-FPM writes its own log through the global error_log setting, and pool settings such as php_admin_value[error_log] and catch_workers_output decide where worker errors go, as described in the PHP-FPM configuration reference. A PHP fatal error that produced a blank 500 is normally recorded here, with the file and line.
  3. var/log/exception.log and var/log/system.log. These are Magento's own logs. var/log/debug.log is not written in production mode by default, according to Adobe's logging guide, so do not expect it to help on a live store.
  4. var/report/. Report files exist only when Magento's handler ran. If a recent file matches the time of your test, the problem is really the error processing case, so follow the report ID guide.
tail -n 50 var/log/exception.log
grep -n "PHP Fatal" /path/to/php-fpm-or-php-error.log | tail -n 20

Run these from the Magento root as the file system owner, and use the log path your server actually configures. Both are read-only.

Keep the evidence private. Logs and report files can contain server paths, configuration values, customer details and request data. Do not paste stack traces into public forums, tickets that customers can see, or chat groups. Share a trimmed excerpt privately with the developer who needs it. Do not switch a public production store to developer mode or turn display_errors on to see the error: reproduce it on a staging copy instead, or read the logs on the server.

Step 3: Match the evidence to the cause

Once you have the first real error line, the causes below cover most blank pages on an existing installation. Fix the one the evidence points to, not all of them at once.

A PHP fatal error: memory, extensions or the PHP version

Typical log lines name an exhausted memory size, a maximum execution time, an undefined function from a missing extension, or a type or syntax error in a file that the current PHP version rejects. Some of these produce the plain text 500 from Step 1 rather than a fully blank page; the diagnosis is the same. Check three things:

  • Which php.ini the web server uses. The command line and PHP-FPM often load different files. Adobe's PHP settings page shows how to find the loaded file for each and says to update both when there are two. A command that works in the terminal proves nothing about the web request.
  • Required extensions. Compare the web server's loaded modules with the list in Adobe's system requirements. An extension present for the CLI can be missing for PHP-FPM.
  • The PHP version against your exact Magento release. The system requirements table lists which PHP versions each 2.4.x line supports. A server PHP upgrade that ran ahead of the Magento upgrade is a common source of fatal errors in core or extension code. The PHP 8.4 compatibility post shows one such pattern.

For memory, Adobe lists higher values for compiling, static deployment and debugging. Those are not a reason to remove the limit for web requests. If one page exhausts memory, find out what it loads before raising the limit.

Generated code that does not match the deployed code

If the page went blank right after a deployment, a Composer change or enabling a module, look for errors about a class that does not exist, an interceptor, a proxy or a factory. Those classes live in generated/ and must match the code. Adobe's mode documentation notes that switching to production clears generated/code and generated/metadata and runs compilation, which shows how closely production depends on a fresh compile. The code compiler page lists what bin/magento setup:di:compile produces.

The fix is to run the release's normal deployment sequence again, under maintenance, as the file system owner, rather than deleting folders on a live store by hand. The setup:di:compile guide covers what compilation does and does not change.

Static content missing in production mode

If the HTML is there but the page looks empty, the Network panel will show 404 responses for files under /static/. In production mode, Adobe says static view files are served from the cache only and must be written with the deployment command, as described in the static view file deployment guide. Default and developer modes generate them on demand, which is why the same code can work on a developer's machine and look blank on live.

The command accepts languages, themes and areas. Deploy every locale the storefront and the Admin users actually use. A missing Admin locale is one reason why the storefront looks fine while the Admin is blank. See the static content deploy guide, and the post on static deploy reusing old files if a deploy ran but old assets remain.

Wrong file ownership

Permission denials appear in the web server log or as failures to write in var/, generated/ or pub/static/. The common trigger is a CLI command run as root or as the wrong user, which leaves new files that the web server user cannot read or write. Adobe's file system permissions guide describes the one-user and two-user setups, a shared group for the web server and the command-line user, and which directories should be writable in each mode.

Find out which user owns the new files and which user ran the last command, then restore ownership and group permissions to the documented model. Do not make the project world-writable with 777: it hides the real ownership problem and lets any account on the server change your code.

Base URL or secure URL mismatch

A redirect loop that ends in white, or a blank page that started after a domain or HTTPS change, points at the store URL settings. Read the current values without changing anything:

bin/magento config:show web/unsecure/base_url
bin/magento config:show web/secure/base_url

The syntax, including --scope and --scope-code for a specific website or store view, is in Adobe's configuration CLI reference, and the settings themselves are described in store URLs. Compare both values with the address visitors really use, including https and the www part, at every scope that overrides them. If secure URLs are switched on, the secure base URL has to be a working https address. Correct the value at the right scope, then clean the configuration cache with bin/magento cache:clean config.

OPcache serving old files after a deploy

If the logs mention lines or classes that no longer exist in the release you just deployed, PHP may still be running cached bytecode. When opcache.validate_timestamps is disabled, php.net states that file changes only take effect after an OPcache reset or a web server restart. Many production servers turn timestamp checks off for speed, so the deploy procedure has to include a graceful reload of PHP-FPM. On a server that hosts several sites, reload only the pool that serves this store.

A third-party module fatal

When the file in the first error line sits under app/code/ or a vendor package that is not magento/, an extension is the likely cause. Check its status with bin/magento module:status. Reproduce the error on staging, and confirm there that disabling the module removes the blank page before you plan anything for live. Adobe's module management guide covers module:disable and the cache and static content steps that follow. In production mode, treat disabling as a deployment change with compilation and static deployment, not a quick switch. Then fix the module or ask its vendor for a compatible release. Never edit files in vendor/.

A JavaScript error that blanks part of the page

If the frame of the page renders and one area stays empty, such as the minicart, product options, checkout or an Admin grid, the Console holds the answer. Luma-based themes and the Admin build these areas with RequireJS and Knockout UI components, which Adobe documents in its UI components guide. One failing module can stop a component from rendering. Hyvä themes replace that stack with Alpine.js and Tailwind CSS, as the Hyvä documentation explains, so a Luma extension without a Hyvä compatibility module often renders nothing at all. The Luma module in Hyvä guide covers that case.

On checkout and payment pages in 2.4.7 and later, a Content Security Policy violation in the Console can leave checkout blank or missing parts. Adobe's CSP restricted mode article describes the exact Console message and the supported fixes.

Admin only, after login

An Admin that goes white after a successful login is the same diagnosis on a different area. Check the Console and the Network panel for /static/adminhtml/ 404s first, which point to a missing Admin theme or locale in the static deployment. If the assets load, read the PHP logs for the dashboard request: a module that hooks into the Admin can fail there while the storefront keeps working.

After the fix: confirm it properly

  • Repeat the Step 1 checks. The document should return 200 with a normal response size, and the Console should be free of new errors.
  • Load the pages that failed, as a guest and as a logged-in customer, plus the Admin if it was affected.
  • Watch the logs while you do this. A page that looks fine but still writes a fatal error on every request is not fixed.
  • Use bin/magento cache:clean for Magento's cache. Adobe's cache management guide explains that cache:flush purges the whole cache storage, which can affect other applications sharing the same Redis or file storage. Keep a flush for the rare case a clean does not help.

Frequently asked questions

Why does my Magento page go blank instead of showing an error report?

The error report page appears only when Magento's own handler catches the exception. A PHP fatal error, missing static files or a JavaScript failure can stop the page before or outside that handler. Check the HTTP status, then the PHP-FPM and web server logs for the same minute.

Is a blank page the same as a Magento 500 error?

Sometimes. A blank page with status 500 is a server error with nothing displayed. A blank page with status 200 is usually a static file or JavaScript problem, and the server logs may be clean. The status code tells you which one to chase.

Should I switch live to developer mode to see the error?

No. Developer mode and display_errors show internal details to every visitor. Read the private logs on the server, or reproduce the problem on a staging copy and use developer mode there.

Can file permissions cause a blank page, and is 777 the fix?

Wrong ownership can cause it, usually after a command ran as the wrong user. The fix is to restore the owner and group model in Adobe's permissions guide. Setting 777 is not a fix and opens the code to every account on the server.

The page went blank right after a deploy. What should I check first?

Read the first error in the PHP log. After a deploy the usual causes are generated code that does not match, static files not deployed for production, OPcache still serving the old release, or files left with the wrong owner. Rerunning the full, normal deployment sequence is safer than fixing one folder by hand.

Still looking at a white page? I debug Magento 2 and Adobe Commerce stores end to end, from nginx or Apache and PHP-FPM to Varnish and Hyvä, and I work from your private logs, not public screenshots. See Magento developer services.

Get help with the blank page

Tagged #Debugging #Magento 2 #Installation #Troubleshooting #Apache #Blank Page #Frontend Error #Permissions #PHP

Kishan Savaliya

Written by

Kishan Savaliya

Adobe-certified Magento 2 + Hyvä developer. 60+ open-source extensions published. Founder of Panth Infotech.

Adobe Certified since 2021Hyvä and Luma

All posts by Kishan Savaliya
Stuck on this? Share the issue or question Ask about your store