WordPress

Fixing the WordPress White Screen of Death

What Is the White Screen Error?

If you open your WordPress site or admin panel and are met with a completely blank white page without any error message, you are facing the issue known as the "White Screen of Death" (WSOD). Because it gives you no information at all, it is one of the most frustrating errors at first glance; however, its cause almost always comes down to one of a few known sources and can be resolved with a systematic approach.

The Most Common Causes

The white screen usually stems from one of the following: a plugin conflict (the most frequent cause), a theme-related error, the PHP memory limit being exhausted, or code incompatibility that appears after a plugin/theme update. An important clue: sometimes only part of the site (for example, just the admin panel or a single page) goes white; this helps you narrow down the problem.

Solution 1: Enable Debug Mode

To see the real error behind the blank page, first enable debugging. Open the wp-config.php file via FTP and find the WP_DEBUG line (add it if it is missing):

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

When you refresh the page, the source of the problem (which plugin/file, which line) appears on the screen or in the wp-content/debug.log file. This is half of the solution. Once you have fixed the problem, set these lines back to false.

Solution 2: Disable All Plugins

The most frequent cause of the white screen is plugins. If you cannot access the panel, you can disable plugins via FTP:

  • Open the wp-content folder via FTP.
  • Temporarily rename the plugins folder to plugins-old.
  • Refresh your site.

If the site loads, the problem is a plugin. Now rename the folder back to plugins, then rename the plugins one by one to find which one is causing the issue. Once you find the culprit plugin, update it, delete it, or install an alternative.

Solution 3: Switch to the Default Theme

If the plugins are fine, the theme may be next. Go to the wp-content/themes folder via FTP and rename your active theme's folder. WordPress automatically falls back to a default theme (for example, Twenty Twenty-Four). If the site loads, the problem is in your theme; update the theme or contact its developer.

Solution 4: Increase the PHP Memory Limit

The site may show a white screen when it exceeds the allocated memory. You can increase the memory limit by adding this line to the wp-config.php file:

define('WP_MEMORY_LIMIT', '256M');

If this does not work, you may need to raise the memory_limit value from the PHP settings in your hosting panel, or ask your hosting provider to do it.

Solution 5: Clear the Cache

If the white screen persists even though the problem has been fixed, clear the cache of your browser and of any caching plugin you may have. Sometimes the old, broken version of the now-fixed page continues to be served from the cache.

Solution 6: Undo the Last Change

The white screen often appears as "it was working yesterday, it's not working today." In this case, the fastest diagnostic method is to remember what you last changed. Did you install a new plugin? Did you update a theme? Did you add a piece of code? The white screen is almost always the result of a recent change. That is why the most practical way to fix the error is to undo the last change: deactivate the plugin you just installed, revert the updated theme to its previous version, or remove the code you added. If you take regular backups, restoring the backup from before the problematic change also delivers results within seconds.

Solution 7: Fix functions.php Errors

A common cause of the white screen in WordPress is faulty code snippets added to the theme's functions.php file. A small syntax error (a missing parenthesis or semicolon) made while pasting a snippet you found on the internet into this file can crash the entire site. If you cannot access the panel, open the wp-content/themes/yourtheme/functions.php file via FTP and delete the code you most recently added. When you enable WP_DEBUG, the error message usually gives you the exact line number of the problematic line, which makes the fix easier. Always making such edits through a child theme also prevents your code from being lost during main theme updates.

Tip for Narrowing Down the Problem

The most practical way to quickly locate the error is to observe where the white screen appears. If both the site's front end and the admin panel (wp-admin) are white, the problem is most likely a plugin affecting the entire site or the PHP memory limit. If only the front end is white but the panel opens, the culprit is usually the active theme. If only a single page is white, a shortcode, page builder element, or content component specific to that page is faulty. By answering this "where is it white?" question, you can head straight for the most likely source instead of eliminating solutions one by one, saving yourself time.

Frequently Asked Questions (FAQ)

I can't access the panel, how do I disable plugins?

Go to the wp-content folder via FTP and temporarily rename the plugins folder to something like plugins-old. This disables all plugins at once. If the site loads, the problem is a plugin; by renaming the folder back to plugins you can then test the plugins one by one.

Why does the white screen not show any error message?

By default, WordPress does not show error messages to visitors. By setting WP_DEBUG to true in the wp-config.php file, you can see the hidden error on the screen or in the wp-content/debug.log file. This is the fastest way to find the source of the problem.

Only one page is white, the rest works. Why?

The fact that the problem appears in only one section helps you narrow down the source. Usually a plugin, shortcode, or page builder element specific to that page is faulty. When you enable WP_DEBUG and refresh that page, the problematic component usually appears in the error log.

Conclusion

Although the white screen error is scary at first, it almost always comes down to one of a few known causes. First enable WP_DEBUG to see the real error, then eliminate plugins and the theme in turn to find the culprit. Increasing the memory limit and undoing your last change also work in most cases. When you proceed systematically, you can solve this problem in a few minutes.

Related Articles

WordPress

Den weißen Bildschirm (White Screen) in WordPress beheben

Was ist der Fehler „Weißer Bildschirm"?

Wenn Sie Ihre WordPress-Website oder das Admin-Panel öffnen und ohne jegliche Fehlermeldung von einer komplett leeren, weißen Seite empfangen werden, haben Sie es mit dem Problem zu tun, das als „White Screen of Death" (WSOD) bekannt ist. Da er Ihnen überhaupt keine Informationen liefert, ist er auf den ersten Blick einer der frustrierendsten Fehler; seine Ursache lässt sich jedoch fast immer auf eine von wenigen bekannten Quellen zurückführen und mit einem systematischen Vorgehen beheben.

Die häufigsten Ursachen

Der weiße Bildschirm rührt meist von einer der folgenden Ursachen her: einem Plugin-Konflikt (die häufigste Ursache), einem themenbedingten Fehler, dem Erschöpfen des PHP-Speicherlimits oder einer Code-Inkompatibilität, die nach einem Plugin-/Theme-Update auftritt. Ein wichtiger Hinweis: Manchmal wird nur ein Teil der Website weiß (zum Beispiel nur das Admin-Panel oder eine einzelne Seite); das hilft Ihnen, das Problem einzugrenzen.

Lösung 1: Den Debug-Modus aktivieren

Um den tatsächlichen Fehler hinter der leeren Seite zu sehen, aktivieren Sie zunächst das Debugging. Öffnen Sie die Datei wp-config.php per FTP und suchen Sie die Zeile WP_DEBUG (fügen Sie sie hinzu, falls sie fehlt):

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Wenn Sie die Seite aktualisieren, erscheint die Ursache des Problems (welches Plugin/welche Datei, welche Zeile) auf dem Bildschirm oder in der Datei wp-content/debug.log. Das ist die halbe Lösung. Nachdem Sie das Problem behoben haben, setzen Sie diese Zeilen wieder auf false.

Lösung 2: Alle Plugins deaktivieren

Die häufigste Ursache des weißen Bildschirms sind Plugins. Wenn Sie nicht auf das Panel zugreifen können, können Sie die Plugins per FTP deaktivieren:

  • Öffnen Sie den Ordner wp-content per FTP.
  • Benennen Sie den Ordner plugins vorübergehend in plugins-alt um.
  • Aktualisieren Sie Ihre Website.

Wenn die Website lädt, ist das Problem ein Plugin. Benennen Sie den Ordner nun wieder in plugins um und benennen Sie anschließend die Plugins einzeln um, um herauszufinden, welches das Problem verursacht. Sobald Sie das schuldige Plugin gefunden haben, aktualisieren Sie es, löschen Sie es oder installieren Sie eine Alternative.

Lösung 3: Zum Standard-Theme wechseln

Wenn die Plugins in Ordnung sind, kann als Nächstes das Theme an der Reihe sein. Gehen Sie per FTP in den Ordner wp-content/themes und benennen Sie den Ordner Ihres aktiven Themes um. WordPress fällt automatisch auf ein Standard-Theme zurück (zum Beispiel Twenty Twenty-Four). Wenn die Website lädt, liegt das Problem in Ihrem Theme; aktualisieren Sie das Theme oder wenden Sie sich an dessen Entwickler.

Lösung 4: Das PHP-Speicherlimit erhöhen

Die Website kann einen weißen Bildschirm anzeigen, wenn sie den zugewiesenen Speicher überschreitet. Sie können das Speicherlimit erhöhen, indem Sie diese Zeile zur Datei wp-config.php hinzufügen:

define('WP_MEMORY_LIMIT', '256M');

Wenn das nicht funktioniert, müssen Sie möglicherweise den Wert memory_limit in den PHP-Einstellungen Ihres Hosting-Panels erhöhen oder Ihren Hosting-Anbieter darum bitten.

Lösung 5: Den Cache leeren

Wenn der weiße Bildschirm fortbesteht, obwohl das Problem behoben wurde, leeren Sie den Cache Ihres Browsers und eines eventuell vorhandenen Cache-Plugins. Manchmal wird die alte, fehlerhafte Version der inzwischen behobenen Seite weiterhin aus dem Cache ausgeliefert.

Lösung 6: Die letzte Änderung rückgängig machen

Der weiße Bildschirm tritt oft als „Gestern hat es funktioniert, heute funktioniert es nicht" auf. In diesem Fall ist die schnellste Diagnosemethode, sich zu erinnern, was Sie zuletzt geändert haben. Haben Sie ein neues Plugin installiert? Haben Sie ein Theme aktualisiert? Haben Sie ein Stück Code hinzugefügt? Der weiße Bildschirm ist fast immer das Ergebnis einer kürzlichen Änderung. Deshalb ist der praktischste Weg, den Fehler zu beheben, die letzte Änderung rückgängig zu machen: Deaktivieren Sie das gerade installierte Plugin, setzen Sie das aktualisierte Theme auf seine vorherige Version zurück oder entfernen Sie den hinzugefügten Code. Wenn Sie regelmäßig Backups erstellen, liefert auch das Wiederherstellen des Backups von vor der problematischen Änderung innerhalb von Sekunden Ergebnisse.

Lösung 7: Fehler in der functions.php beheben

Eine häufige Ursache des weißen Bildschirms in WordPress sind fehlerhafte Code-Schnipsel, die zur Datei functions.php des Themes hinzugefügt wurden. Ein kleiner Syntaxfehler (eine fehlende Klammer oder ein fehlendes Semikolon), der beim Einfügen eines im Internet gefundenen Schnipsels in diese Datei gemacht wird, kann die gesamte Website zum Absturz bringen. Wenn Sie nicht auf das Panel zugreifen können, öffnen Sie per FTP die Datei wp-content/themes/ihrtheme/functions.php und löschen Sie den zuletzt hinzugefügten Code. Wenn Sie WP_DEBUG aktivieren, gibt die Fehlermeldung in der Regel die genaue Zeilennummer der problematischen Zeile an, was die Behebung erleichtert. Solche Änderungen stets über ein Child-Theme vorzunehmen, verhindert außerdem, dass Ihr Code bei Updates des Haupt-Themes verloren geht.

Tipp zum Eingrenzen des Problems

Der praktischste Weg, den Fehler schnell zu lokalisieren, ist zu beobachten, wo der weiße Bildschirm auftritt. Wenn sowohl das Frontend der Website als auch das Admin-Panel (wp-admin) weiß sind, ist das Problem höchstwahrscheinlich ein Plugin, das die gesamte Website betrifft, oder das PHP-Speicherlimit. Wenn nur das Frontend weiß ist, das Panel sich aber öffnet, ist meist das aktive Theme der Schuldige. Wenn nur eine einzelne Seite weiß ist, ist ein Shortcode, ein Page-Builder-Element oder eine Inhaltskomponente speziell für diese Seite fehlerhaft. Indem Sie diese Frage „Wo ist es weiß?" beantworten, können Sie direkt auf die wahrscheinlichste Quelle zusteuern, anstatt Lösungen eine nach der anderen auszuschließen, und sparen sich so Zeit.

Häufig gestellte Fragen (FAQ)

Ich komme nicht ins Panel, wie deaktiviere ich Plugins?

Gehen Sie per FTP in den Ordner wp-content und benennen Sie den Ordner plugins vorübergehend in etwas wie plugins-alt um. Damit werden alle Plugins auf einmal deaktiviert. Wenn die Website lädt, ist das Problem ein Plugin; indem Sie den Ordner wieder in plugins umbenennen, können Sie die Plugins anschließend einzeln testen.

Warum zeigt der weiße Bildschirm keine Fehlermeldung an?

Standardmäßig zeigt WordPress Besuchern keine Fehlermeldungen an. Indem Sie in der Datei wp-config.php WP_DEBUG auf true setzen, können Sie den verborgenen Fehler auf dem Bildschirm oder in der Datei wp-content/debug.log sehen. Das ist der schnellste Weg, die Ursache des Problems zu finden.

Nur eine Seite ist weiß, der Rest funktioniert. Warum?

Die Tatsache, dass das Problem nur in einem Bereich auftritt, hilft Ihnen, die Quelle einzugrenzen. Meist ist ein Plugin, ein Shortcode oder ein Page-Builder-Element speziell für diese Seite fehlerhaft. Wenn Sie WP_DEBUG aktivieren und diese Seite aktualisieren, erscheint die problematische Komponente in der Regel im Fehlerprotokoll.

Fazit

Obwohl der Fehler mit dem weißen Bildschirm zunächst beängstigend ist, lässt er sich fast immer auf eine von wenigen bekannten Ursachen zurückführen. Aktivieren Sie zuerst WP_DEBUG, um den tatsächlichen Fehler zu sehen, und schließen Sie dann nacheinander Plugins und das Theme aus, um den Schuldigen zu finden. Das Erhöhen des Speicherlimits und das Rückgängigmachen Ihrer letzten Änderung funktionieren ebenfalls in den meisten Fällen. Wenn Sie systematisch vorgehen, können Sie dieses Problem in wenigen Minuten lösen.

Verwandte Artikel

WordPress

Résoudre l'écran blanc de la mort (White Screen) sous WordPress

Qu'est-ce que l'erreur de l'écran blanc ?

Si vous ouvrez votre site WordPress ou son panneau d'administration et que vous tombez sur une page entièrement blanche, sans aucun message d'erreur, vous êtes confronté au problème connu sous le nom d'« écran blanc de la mort » (White Screen of Death, ou WSOD). Comme il ne vous donne aucune information, c'est à première vue l'une des erreurs les plus frustrantes ; sa cause se ramène toutefois presque toujours à l'une de quelques sources connues et peut être résolue par une approche méthodique.

Les causes les plus fréquentes

L'écran blanc provient généralement de l'une des causes suivantes : un conflit d'extension (la cause la plus fréquente), une erreur liée au thème, l'épuisement de la limite de mémoire PHP, ou une incompatibilité de code apparaissant après la mise à jour d'une extension ou d'un thème. Un indice important : il arrive que seule une partie du site (par exemple uniquement le panneau d'administration ou une seule page) devienne blanche ; cela vous aide à circonscrire le problème.

Solution 1 : activer le mode débogage

Pour voir l'erreur réelle qui se cache derrière la page blanche, commencez par activer le débogage. Ouvrez le fichier wp-config.php via FTP et repérez la ligne WP_DEBUG (ajoutez-la si elle est absente) :

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Lorsque vous actualisez la page, la source du problème (quelle extension/quel fichier, quelle ligne) apparaît à l'écran ou dans le fichier wp-content/debug.log. C'est la moitié de la solution. Une fois le problème corrigé, remettez ces lignes sur false.

Solution 2 : désactiver toutes les extensions

La cause la plus fréquente de l'écran blanc, ce sont les extensions. Si vous ne pouvez pas accéder au panneau, vous pouvez désactiver les extensions via FTP :

  • Ouvrez le dossier wp-content via FTP.
  • Renommez temporairement le dossier plugins en plugins-ancien.
  • Actualisez votre site.

Si le site se charge, le problème vient d'une extension. Renommez maintenant le dossier en plugins, puis renommez les extensions une à une pour trouver celle qui pose problème. Une fois l'extension coupable identifiée, mettez-la à jour, supprimez-la ou installez une alternative.

Solution 3 : passer au thème par défaut

Si les extensions sont en ordre, le thème peut être le suivant sur la liste. Allez dans le dossier wp-content/themes via FTP et renommez le dossier de votre thème actif. WordPress bascule automatiquement sur un thème par défaut (par exemple Twenty Twenty-Four). Si le site se charge, le problème se trouve dans votre thème ; mettez le thème à jour ou contactez son développeur.

Solution 4 : augmenter la limite de mémoire PHP

Le site peut afficher un écran blanc lorsqu'il dépasse la mémoire qui lui est allouée. Vous pouvez augmenter la limite de mémoire en ajoutant cette ligne au fichier wp-config.php :

define('WP_MEMORY_LIMIT', '256M');

Si cela ne fonctionne pas, vous devrez peut-être augmenter la valeur memory_limit depuis les réglages PHP de votre panneau d'hébergement, ou demander à votre hébergeur de le faire.

Solution 5 : vider le cache

Si l'écran blanc persiste alors même que le problème a été corrigé, videz le cache de votre navigateur ainsi que celui d'une éventuelle extension de mise en cache. Il arrive que l'ancienne version défectueuse de la page désormais corrigée continue d'être servie depuis le cache.

Solution 6 : annuler la dernière modification

L'écran blanc se présente souvent sous la forme « ça marchait hier, ça ne marche plus aujourd'hui ». Dans ce cas, la méthode de diagnostic la plus rapide consiste à vous rappeler ce que vous avez modifié en dernier. Avez-vous installé une nouvelle extension ? Avez-vous mis à jour un thème ? Avez-vous ajouté un bout de code ? L'écran blanc est presque toujours le résultat d'une modification récente. C'est pourquoi le moyen le plus pratique de corriger l'erreur est d'annuler la dernière modification : désactivez l'extension que vous venez d'installer, ramenez le thème mis à jour à sa version précédente ou supprimez le code que vous avez ajouté. Si vous effectuez des sauvegardes régulières, restaurer la sauvegarde antérieure à la modification problématique donne aussi des résultats en quelques secondes.

Solution 7 : corriger les erreurs de functions.php

Une cause fréquente de l'écran blanc sous WordPress, ce sont les extraits de code défectueux ajoutés au fichier functions.php du thème. Une petite erreur de syntaxe (une parenthèse ou un point-virgule manquant) commise en collant dans ce fichier un extrait trouvé sur Internet peut faire planter tout le site. Si vous ne pouvez pas accéder au panneau, ouvrez le fichier wp-content/themes/votretheme/functions.php via FTP et supprimez le code que vous avez ajouté en dernier. Lorsque vous activez WP_DEBUG, le message d'erreur indique généralement le numéro exact de la ligne problématique, ce qui facilite la correction. Effectuer toujours ce type de modification via un thème enfant (child theme) évite par ailleurs que votre code ne soit perdu lors des mises à jour du thème principal.

Astuce pour circonscrire le problème

Le moyen le plus pratique de localiser rapidement l'erreur est d'observer où l'écran blanc apparaît. Si le front-end du site et le panneau d'administration (wp-admin) sont tous deux blancs, le problème est très probablement une extension affectant l'ensemble du site ou la limite de mémoire PHP. Si seul le front-end est blanc mais que le panneau s'ouvre, le coupable est en général le thème actif. Si une seule page est blanche, c'est un shortcode, un élément de constructeur de pages (page builder) ou un composant de contenu propre à cette page qui est défectueux. En répondant à cette question « où est-ce blanc ? », vous pouvez vous diriger directement vers la source la plus probable au lieu d'éliminer les solutions une par une, et ainsi gagner du temps.

Foire aux questions (FAQ)

Je n'arrive pas à accéder au panneau, comment désactiver les extensions ?

Allez dans le dossier wp-content via FTP et renommez temporairement le dossier plugins en quelque chose comme plugins-ancien. Cela désactive toutes les extensions d'un coup. Si le site se charge, le problème vient d'une extension ; en renommant le dossier en plugins, vous pouvez ensuite tester les extensions une à une.

Pourquoi l'écran blanc n'affiche-t-il aucun message d'erreur ?

Par défaut, WordPress n'affiche pas de messages d'erreur aux visiteurs. En définissant WP_DEBUG sur true dans le fichier wp-config.php, vous pouvez voir l'erreur masquée à l'écran ou dans le fichier wp-content/debug.log. C'est le moyen le plus rapide de trouver la source du problème.

Une seule page est blanche, le reste fonctionne. Pourquoi ?

Le fait que le problème n'apparaisse que dans une seule section vous aide à circonscrire la source. C'est généralement une extension, un shortcode ou un élément de constructeur de pages propre à cette page qui est défectueux. Lorsque vous activez WP_DEBUG et que vous actualisez cette page, le composant problématique apparaît généralement dans le journal des erreurs.

Conclusion

Même si l'erreur de l'écran blanc fait peur au premier abord, elle se ramène presque toujours à l'une de quelques causes connues. Activez d'abord WP_DEBUG pour voir l'erreur réelle, puis éliminez tour à tour les extensions et le thème afin de trouver le coupable. Augmenter la limite de mémoire et annuler votre dernière modification fonctionnent également dans la plupart des cas. En procédant de façon méthodique, vous pouvez résoudre ce problème en quelques minutes.

Articles liés

WordPress

Risolvere la schermata bianca della morte (White Screen) in WordPress

Che cos'è l'errore della schermata bianca?

Se apre il Suo sito WordPress o il pannello di amministrazione e Le viene presentata una pagina completamente bianca, senza alcun messaggio di errore, si trova davanti al problema noto come "White Screen of Death" (WSOD), ovvero la "schermata bianca della morte". Poiché non fornisce alcuna informazione, è a prima vista uno degli errori più frustranti; tuttavia la sua causa si riconduce quasi sempre a una di poche fonti note e può essere risolta con un approccio sistematico.

Le cause più comuni

La schermata bianca deriva di solito da una delle seguenti cause: un conflitto tra plugin (la causa più frequente), un errore legato al tema, l'esaurimento del limite di memoria PHP o un'incompatibilità del codice che si manifesta dopo l'aggiornamento di un plugin o di un tema. Un indizio importante: a volte solo una parte del sito (per esempio solo il pannello di amministrazione o una singola pagina) diventa bianca; questo La aiuta a circoscrivere il problema.

Soluzione 1: attivare la modalità di debug

Per vedere l'errore reale che si nasconde dietro la pagina bianca, attivi per prima cosa il debug. Apra il file wp-config.php tramite FTP e individui la riga WP_DEBUG (la aggiunga se manca):

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Quando aggiorna la pagina, l'origine del problema (quale plugin/file, quale riga) compare sullo schermo o nel file wp-content/debug.log. Questa è metà della soluzione. Una volta risolto il problema, riporti queste righe su false.

Soluzione 2: disattivare tutti i plugin

La causa più frequente della schermata bianca sono i plugin. Se non riesce ad accedere al pannello, può disattivare i plugin tramite FTP:

  • Apra la cartella wp-content tramite FTP.
  • Rinomini temporaneamente la cartella plugins in plugins-old.
  • Aggiorni il Suo sito.

Se il sito si carica, il problema è un plugin. Ora rinomini di nuovo la cartella in plugins, quindi rinomini i plugin uno per uno per individuare quello che sta causando il problema. Una volta trovato il plugin colpevole, lo aggiorni, lo elimini oppure installi un'alternativa.

Soluzione 3: passare al tema predefinito

Se i plugin sono in ordine, potrebbe essere il turno del tema. Vada nella cartella wp-content/themes tramite FTP e rinomini la cartella del Suo tema attivo. WordPress passa automaticamente a un tema predefinito (per esempio Twenty Twenty-Four). Se il sito si carica, il problema è nel Suo tema; aggiorni il tema o contatti il suo sviluppatore.

Soluzione 4: aumentare il limite di memoria PHP

Il sito può mostrare una schermata bianca quando supera la memoria assegnata. Può aumentare il limite di memoria aggiungendo questa riga al file wp-config.php:

define('WP_MEMORY_LIMIT', '256M');

Se questo non funziona, potrebbe dover aumentare il valore memory_limit dalle impostazioni PHP del Suo pannello di hosting, oppure chiedere al Suo fornitore di hosting di farlo.

Soluzione 5: svuotare la cache

Se la schermata bianca persiste anche dopo aver risolto il problema, svuoti la cache del Suo browser e di un eventuale plugin di caching. A volte la vecchia versione difettosa della pagina ormai corretta continua a essere servita dalla cache.

Soluzione 6: annullare l'ultima modifica

La schermata bianca si presenta spesso nella forma "ieri funzionava, oggi non funziona". In questo caso il metodo di diagnosi più rapido è ricordare che cosa ha modificato per ultimo. Ha installato un nuovo plugin? Ha aggiornato un tema? Ha aggiunto uno snippet di codice? La schermata bianca è quasi sempre il risultato di una modifica recente. Per questo motivo il modo più pratico per correggere l'errore è annullare l'ultima modifica: disattivi il plugin appena installato, riporti il tema aggiornato alla versione precedente o rimuova il codice che ha aggiunto. Se effettua backup regolari, anche ripristinare il backup precedente alla modifica problematica dà risultati nel giro di pochi secondi.

Soluzione 7: correggere gli errori in functions.php

Una causa frequente della schermata bianca in WordPress sono gli snippet di codice difettosi aggiunti al file functions.php del tema. Un piccolo errore di sintassi (una parentesi o un punto e virgola mancanti) commesso incollando in questo file uno snippet trovato in rete può mandare in crash l'intero sito. Se non riesce ad accedere al pannello, apra tramite FTP il file wp-content/themes/iltuotema/functions.php ed elimini il codice che ha aggiunto per ultimo. Quando attiva WP_DEBUG, il messaggio di errore di solito indica il numero esatto della riga problematica, il che facilita la correzione. Effettuare sempre questo tipo di modifiche tramite un tema child evita inoltre che il Suo codice vada perso durante gli aggiornamenti del tema principale.

Consiglio per circoscrivere il problema

Il modo più pratico per individuare rapidamente l'errore è osservare dove compare la schermata bianca. Se sia il front-end del sito sia il pannello di amministrazione (wp-admin) sono bianchi, il problema è molto probabilmente un plugin che interessa l'intero sito o il limite di memoria PHP. Se solo il front-end è bianco ma il pannello si apre, il colpevole è di solito il tema attivo. Se è bianca solo una singola pagina, è difettoso uno shortcode, un elemento di un page builder o un componente di contenuto specifico di quella pagina. Rispondendo a questa domanda "dove è bianco?" può puntare direttamente alla fonte più probabile invece di eliminare le soluzioni una per una, risparmiando tempo.

Domande frequenti (FAQ)

Non riesco ad accedere al pannello, come disattivo i plugin?

Vada nella cartella wp-content tramite FTP e rinomini temporaneamente la cartella plugins in qualcosa come plugins-old. Questo disattiva tutti i plugin in una sola volta. Se il sito si carica, il problema è un plugin; rinominando di nuovo la cartella in plugins potrà poi testare i plugin uno per uno.

Perché la schermata bianca non mostra alcun messaggio di errore?

Per impostazione predefinita, WordPress non mostra messaggi di errore ai visitatori. Impostando WP_DEBUG su true nel file wp-config.php può vedere l'errore nascosto sullo schermo o nel file wp-content/debug.log. È il modo più rapido per trovare l'origine del problema.

Solo una pagina è bianca, il resto funziona. Perché?

Il fatto che il problema compaia solo in una sezione La aiuta a circoscrivere la fonte. Di solito è difettoso un plugin, uno shortcode o un elemento del page builder specifico di quella pagina. Quando attiva WP_DEBUG e aggiorna quella pagina, il componente problematico di solito compare nel log degli errori.

Conclusione

Anche se l'errore della schermata bianca all'inizio fa paura, si riconduce quasi sempre a una di poche cause note. Attivi prima WP_DEBUG per vedere l'errore reale, poi escluda nell'ordine plugin e tema per individuare il colpevole. Anche aumentare il limite di memoria e annullare la Sua ultima modifica funzionano nella maggior parte dei casi. Procedendo in modo sistematico può risolvere questo problema in pochi minuti.

Articoli correlati

WordPress

WordPress Beyaz Ekran (White Screen) Hatası Çözümü

Beyaz Ekran Hatası Nedir?

WordPress sitenizi veya yönetim panelinizi açtığınızda hiçbir hata mesajı olmadan bomboş beyaz bir sayfa ile karşılaşıyorsanız, "Beyaz Ölüm Ekranı" (White Screen of Death — WSOD) olarak bilinen sorunla karşı karşıyasınız demektir. Hiçbir bilgi vermediği için ilk anda en sinir bozucu hatalardan biridir; ancak nedeni neredeyse her zaman birkaç bilinen kaynaktan birine dayanır ve sistematik bir yaklaşımla çözülür.

En Yaygın Nedenler

Beyaz ekranın arkasında genellikle şunlar yatar: bir eklenti çakışması (en sık neden), tema kaynaklı bir hata, PHP bellek limitinin dolması veya bir eklenti/tema güncellemesi sonrası ortaya çıkan kod uyumsuzluğu. Önemli bir ipucu: bazen sitenin yalnızca bir bölümü (örneğin sadece yönetim paneli ya da sadece tek bir sayfa) beyaz olur; bu, sorunu daraltmanıza yardımcı olur.

Çözüm 1: Hata Ayıklama (Debug) Modunu Açın

Boş sayfanın ardındaki gerçek hatayı görmek için önce hata ayıklamayı açın. FTP ile wp-config.php dosyasını açın ve WP_DEBUG satırını bulun (yoksa ekleyin):

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Sayfayı yenilediğinizde sorunun kaynağı (hangi eklenti/dosya, hangi satır) ekranda veya wp-content/debug.log dosyasında görünür. Bu, çözümün yarısıdır. Sorunu çözdükten sonra bu satırları tekrar false yapın.

Çözüm 2: Tüm Eklentileri Devre Dışı Bırakın

Beyaz ekranın en sık nedeni eklentilerdir. Panele giremiyorsanız eklentileri FTP üzerinden devre dışı bırakabilirsiniz:

  • FTP ile wp-content klasörüne girin.
  • plugins klasörünün adını geçici olarak plugins-eski olarak değiştirin.
  • Sitenizi yenileyin.

Site açıldıysa sorun bir eklentidedir. Şimdi klasör adını tekrar plugins yapın, ardından eklentileri tek tek yeniden adlandırarak hangisinin soruna yol açtığını bulun. Suçlu eklentiyi bulduğunuzda güncelleyin, silin veya alternatifini kurun.

Çözüm 3: Varsayılan Temaya Geçin

Eklentiler sorunsuzsa sıra temada olabilir. FTP ile wp-content/themes klasörüne girin ve aktif temanızın klasör adını değiştirin. WordPress otomatik olarak varsayılan bir temaya (örneğin Twenty Twenty-Four) döner. Site açıldıysa sorun temanızdadır; temayı güncelleyin veya geliştiricisiyle iletişime geçin.

Çözüm 4: PHP Bellek Limitini Artırın

Site, ayrılan belleği aştığında beyaz ekran verebilir. wp-config.php dosyasına şu satırı ekleyerek bellek limitini artırabilirsiniz:

define('WP_MEMORY_LIMIT', '256M');

Bu işe yaramazsa, hosting panelinizdeki PHP ayarlarından memory_limit değerini yükseltmeniz veya hosting firmanızdan bunu istemeniz gerekebilir.

Çözüm 5: Önbelleği Temizleyin

Sorun çözüldüğü halde beyaz ekran devam ediyorsa, tarayıcınızın ve varsa bir önbellek eklentisinin (cache) önbelleğini temizleyin. Bazen düzelen sayfanın eski bozuk hali önbellekten gösterilmeye devam eder.

Çözüm 6: Son Yapılan Değişikliği Geri Alın

Beyaz ekran genellikle "dün çalışıyordu, bugün çalışmıyor" şeklinde ortaya çıkar. Bu durumda en hızlı teşhis yöntemi, son ne değiştiğinizi hatırlamaktır. Yeni bir eklenti mi kurdunuz? Bir tema mı güncellediniz? Bir kod parçası mı eklediniz? Beyaz ekran neredeyse her zaman son yapılan bir değişikliğin sonucudur. Bu yüzden hatayı çözmenin en pratik yolu, son değişikliği geri almaktır: yeni kurduğunuz eklentiyi devre dışı bırakın, güncellenen temayı eski sürümüne döndürün veya eklediğiniz kodu kaldırın. Düzenli yedek alıyorsanız, sorunlu değişiklikten önceki yedeğe dönmek de saniyeler içinde sonuç verir.

Çözüm 7: functions.php Hatalarını Düzeltin

WordPress'te beyaz ekranın sık görülen bir nedeni, temanın functions.php dosyasına eklenen hatalı kod parçalarıdır. İnternette bulduğunuz bir kod parçasını bu dosyaya yapıştırırken yapılan küçük bir sözdizimi hatası (eksik bir parantez veya noktalı virgül) tüm siteyi çökertebilir. Panele giremiyorsanız, FTP ile wp-content/themes/temaniz/functions.php dosyasını açıp en son eklediğiniz kodu silin. WP_DEBUG'ı açtığınızda hata mesajı genellikle sorunlu satırın tam numarasını verir; bu da düzeltmeyi kolaylaştırır. Bu tür düzenlemeleri her zaman bir alt tema (child theme) üzerinden yapmak, ana tema güncellemelerinde kodunuzun kaybolmasını da önler.

Sorunu Daraltma İpucu

Hatanın yerini hızlıca bulmanın en pratik yolu, beyaz ekranın nerede çıktığını gözlemlemektir. Eğer hem site ön yüzü hem de yönetim paneli (wp-admin) beyazsa, sorun büyük olasılıkla tüm siteyi etkileyen bir eklentide ya da PHP bellek limitindedir. Yalnızca ön yüz beyaz, panel açılıyorsa suçlu genellikle aktif temadır. Yalnızca tek bir sayfa beyazsa, o sayfaya özel bir kısa kod, sayfa oluşturucu öğesi ya da içerik bileşeni hatalıdır. Bu "nerede beyaz?" sorusunu yanıtlayarak, denenecek çözümleri tek tek elemek yerine doğrudan en olası kaynağa yönelebilir ve zaman kazanırsınız.

Sıkça Sorulan Sorular (SSS)

Panele giremiyorum, eklentileri nasıl kapatırım?

FTP ile wp-content klasörüne girin ve plugins klasörünün adını geçici olarak plugins-eski gibi bir adla değiştirin. Bu, tüm eklentileri tek seferde devre dışı bırakır. Site açıldıysa sorun bir eklentidir; klasör adını tekrar plugins yaparak eklentileri tek tek deneyebilirsiniz.

Beyaz ekran neden hiçbir hata mesajı göstermiyor?

WordPress varsayılan olarak hata mesajlarını ziyaretçilere göstermez. wp-config.php dosyasında WP_DEBUG değerini true yaparak gizli hatayı ekranda veya wp-content/debug.log dosyasında görebilirsiniz. Bu, sorunun kaynağını bulmanın en hızlı yoludur.

Sadece bir sayfa beyaz, gerisi çalışıyor. Neden?

Sorunun yalnızca bir bölümde görünmesi, kaynağı daraltmanıza yardımcı olur. Genellikle o sayfaya özel bir eklenti, kısa kod (shortcode) ya da sayfa oluşturucu (page builder) öğesi hatalıdır. WP_DEBUG'ı açıp o sayfayı yenilediğinizde sorunlu bileşen genellikle hata kaydında görünür.

Sonuç

Beyaz ekran hatası ilk anda korkutucu olsa da, neredeyse her zaman birkaç bilinen nedenden birine dayanır. Önce WP_DEBUG'ı açıp gerçek hatayı görün, ardından eklentileri ve temayı sırayla eleyerek suçluyu bulun. Bellek limitini artırmak ve son yaptığınız değişikliği geri almak da çoğu durumda işe yarar. Sistematik ilerlediğinizde bu sorunu birkaç dakikada çözebilirsiniz.

İlgili Yazılar