Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Como corrigir a tela branca da morte do WordPress (passo a passo)

Nota editorial: Ganhamos uma comissão de links de parceiros no WPBeginner. As comissões não afetam as opiniões ou avaliações de nossos editores. Saiba mais sobre Processo editorial.

A tela branca da morte do WordPress é um dos erros mais comuns do WordPress. Também é um erro frustrante porque não há mensagem e você fica bloqueado no WordPress.

Outro problema com o erro da tela branca da morte é que, às vezes, ele afeta apenas uma determinada parte do seu site. Por exemplo, talvez você só veja a tela branca da morte dentro da área de administração do WordPress, enquanto todo o resto funciona bem. Em outros casos, pode ser que ela apareça somente em um post específico.

Neste artigo, mostraremos como corrigir a tela branca da morte do WordPress, analisando diferentes soluções.

How to Fix the WordPress White Screen of Death (Step by Step)

Observação: antes de fazer qualquer alteração em seu site, certifique-se de ter um backup do site do WordPress. Se você não tiver acesso à área de administração, consulte nosso guia sobre como criar manualmente um backup do banco de dados do WordPress.

Por que você vê a tela branca da morte no WordPress?

Na maioria das vezes, quando você vê uma tela branca da morte ao tentar visitar seu site do WordPress, isso significa que um script em seu site esgotou o limite de memória.

O script que não responde é eliminado pelo servidor de hospedagem do WordPress ou simplesmente atinge o tempo limite. É por isso que nenhuma mensagem de erro real é gerada, e você vê apenas uma tela branca em branco.

WordPress showing white screen instead of website

No entanto, às vezes, você pode ver uma mensagem de erro.

Por exemplo, você pode ver uma mensagem de erro crítico em vez de uma página em branco.

Critical error in WordPress

Não importa se você está vendo uma tela em branco ou a mensagem “Houve um erro crítico no seu site”, o erro é o mesmo.

Esse erro também pode ocorrer devido a um tema ou plug-in mal codificado instalado em seu site. Às vezes, isso pode ocorrer se houver um problema com seu servidor de hospedagem na Web.

Como o erro de tela branca pode ser causado por vários fatores, é necessária uma solução de problemas metódica para corrigi-lo. Aqui estão as etapas que você deve tentar:

Tutorial em vídeo

Subscribe to WPBeginner

Se você preferir instruções por escrito, continue lendo.

1. Verifique se o problema ocorre em seus outros sites

Se você tiver outros sites WordPress instalados na mesma conta de hospedagem, comece verificando se o problema também está ocorrendo em outros sites.

Se for, esse é um forte indicador de que há algo errado com seu serviço de hospedagem WordPress. Esse pode ser um problema temporário que afeta o serviço e você precisa entrar em contato com o suporte para obter mais ajuda.

Por outro lado, se o problema estiver ocorrendo somente em um site ou em uma parte específica desse site, você saberá que o problema está nesse site específico.

2. Corrigir o erro de tela branca com o modo de recuperação do WordPress

Se o erro da tela branca da morte for causado por um plug-in ou tema do WordPress, o WordPress poderá detectá-lo.

O novo recurso de proteção contra erros fatais introduzido no WordPress 5.2 pode, às vezes, detectar o erro, de modo que talvez você nem veja uma tela branca. Em vez disso, você verá uma mensagem informando que o site está com dificuldades técnicas.

This Site Is Experiencing Technical Difficulties Error Message

O WordPress também enviará um e-mail sobre o problema para seu endereço de e-mail de administrador.

O e-mail terá o assunto “Seu site está passando por um problema técnico”.

Technical Difficulties Email With Link to Recovery Mode

Essa mensagem de e-mail indicará o plug-in ou o tema que está causando o erro e também conterá um link especial.

Esse link permitirá que você faça login no modo de recuperação do WordPress e desative o plug-in com defeito.

WordPress recovery mode dashboard

No entanto, se estiver vendo a tela branca da morte sem nenhuma opção de e-mail ou modo de recuperação, será necessário corrigir o erro manualmente.

3. Aumentar o limite de memória

Normalmente, esse erro ocorre porque um script esgotou a memória do servidor da Web e foi encerrado no meio do processo.

Para corrigir isso, você precisa aumentar a memória PHP disponível para o WordPress. Isso permitirá que o script use mais memória para concluir o trabalho que deveria fazer.

Você precisará editar o arquivo wp-config.php em seu site do WordPress ou usar um plug-in de snippet de código como o WPCode.

Você pode seguir as instruções em nosso tutorial sobre como aumentar a memória PHP no WordPress.

4. Corrija o erro de tela branca desativando todos os plug-ins

Se o aumento do limite de memória do PHP não ajudar, ou se você tiver um limite de memória alto, como 256M ou 512M, será necessário iniciar a solução de problemas.

Em nossa experiência de solução de problemas, sempre descobrimos que o problema está em um plug-in específico ou em um tema. Vamos em frente e desativar todos os plug-ins.

Se ainda puder acessar o painel de administração do WordPress, basta ir para a página Plugins ” Plugins instalados. Selecione todos os plug-ins instalados e, em seguida, selecione “Deactivate” (Desativar) no menu suspenso “Bulk actions” (Ações em massa).

Deactivate all WordPress plugins

No entanto, se você não tiver acesso à área de administração do WordPress, precisará desativar todos os plug-ins via FTP.

Primeiro, conecte-se ao seu site WordPress usando um cliente FTP ou o gerenciador de arquivos do seu provedor de hospedagem. Depois de conectado, vá para a pasta wp-content, onde você verá a pasta plugins.

Agora, você precisa clicar com o botão direito do mouse na pasta de plug-ins e selecionar “Renomear”. Você pode renomear a pasta de plug-ins para “plugins-deactivated”.

Using FTP to Rename the Plugins Folder

O WordPress procura uma pasta chamada plugins para carregar todos os plugins. Quando não consegue encontrar a pasta, ele simplesmente desativa todos os plug-ins.

Se isso corrigir o problema, ative um plug-in de cada vez para descobrir a causa do problema. Quando encontrar o plug-in que está causando o problema, você poderá substituí-lo por um alternativo ou relatar o problema aos autores do plug-in.

5. Ativar o tema padrão

Se a solução de problemas do plug-in não resolver o problema, tente substituir o tema ativo por um tema padrão.

Primeiro, conecte-se ao seu site usando um cliente FTP e vá para a pasta /wp-content/themes/. Ela contém todos os temas instalados em seu site.

Clique com o botão direito do mouse para selecionar o tema atual do WordPress e baixá-lo para o computador como um backup.

Using FTP to Download the Current Theme as a Backup

Em seguida, você precisa excluir o tema atual do seu site.

Basta clicar com o botão direito do mouse na pasta do tema e selecionar “Excluir”. Seu cliente FTP excluirá o tema do seu site.

Using FTP to Delete the Current Theme

Agora, se você tiver um tema padrão do WordPress como (Twenty Twenty-Two ou Twenty Twenty-Three) instalado em seu site, o WordPress começará a usá-lo automaticamente como tema padrão.

No entanto, se você não tiver um tema padrão instalado, precisará instalá-lo manualmente usando o FTP.

Se isso corrigir o problema, você deverá examinar o arquivo functions.php do tema. Se houver espaços extras na parte inferior do arquivo, você precisará removê-los e, às vezes, isso resolve o problema.

Se você estiver usando uma função mal codificada no arquivo functions.php do seu tema, isso também poderá causar o erro de tela branca da morte.

Considere a possibilidade de baixar uma nova cópia do tema a partir da fonte e instalá-la manualmente usando FTP.

6. Ativar o modo de depuração para detectar erros no WordPress

Se nada tiver ajudado até agora, a próxima etapa é ativar a depuração no WordPress. Isso manterá registros de erros que lhe permitirão ver que tipo de erros estão sendo emitidos.

Basta adicionar o seguinte código ao seu arquivowp-config.php:

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

Depois de adicionar isso, a tela em branco passará a ter erros, avisos e notificações. Eles podem ajudá-lo a determinar a causa raiz.

Se não houver nenhum erro, talvez seja melhor verificar o registro de depuração.

Basta acessar a pasta wp-content em seu site usando um cliente FTP. Lá, você encontrará um novo arquivo debug.log que contém um registro de todos os erros, avisos e advertências.

Debug log

7. Limpar o cache do WordPress

Às vezes, você pode ter acesso ao back-end, mas o front-end do site apresenta a tela branca da morte.

Isso pode acontecer por causa de um plugin de cache. Nesse caso, basta esvaziar o cache do WordPress.

Consulte nosso guia sobre como limpar o cache no WordPress para obter instruções detalhadas.

8. Corrigir o erro de tela branca para artigos mais longos

Se você tiver uma tela branca da morte somente em uma postagem ou página muito longa, esse método poderá funcionar.

Esse truque basicamente aumenta a capacidade de processamento de texto do PHP, aumentando o limite de recursão e retrocesso. Você pode colar o código a seguir em seu arquivo wp-config.php:

/** Trick for long posts */
ini_set('pcre.recursion_limit',20000000);
ini_set('pcre.backtrack_limit',10000000);

Entendemos que esse é um erro muito frustrante e esperamos que um dos truques acima tenha corrigido o problema para você.

Talvez você também queira ver nosso guia de solução de problemas do WordPress, que ensina as etapas que você deve seguir para detectar e corrigir problemas do WordPress por conta própria, ou nossa seleção de especialistas dos melhores provedores de hospedagem gerenciada do WordPress.

Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

296 ComentáriosDeixe uma resposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Omar Sirwan says

    I solved it…
    I tried those:
    define(‘WP_MEMORY_LIMIT’, ’64M’);
    Change Plugins name
    Check white spaces
    Increase memory
    Change Theme
    Upload new wp-admin
    And everything related to plugins

    Finally I downloaded my wp-config using FTP. Opened it with notepad++ and save it again with the encoding utf-8… It was utf-8 BOM.

  3. Madeleine Landley says

    This is one of the most extensive guides I found so far – with easy tutorials on how to solve it. I like it!

    I’m actually only missing one thing causing WSOD and that is extra spaces in the code, usually in functions.php, header.php, single.php etc. I’ve found this error causing most of the white screens I’ve resolved. The extra spaces are usually at the end of the file, after a closing ?>, used instead of tabs and on line breaks (empty rows).

    Thanks for a great guide.

  4. Michael Silva says

    After some changes (failures !!) in the code of a plugin did the famous White wp screen with the following message “Parse error: syntax error, unexpected ‘the’ (T_STRING) in / home / velafati / public_html / wp-content /plugins/woocommerce/includes/class-wc-countries.php on line 436 ”
    How to know where the problem had been entered in the file “class-wc-countries.php” through cpanel and replace all the code for the original code (had recorded the original code in Notepad). The problem is that even after upgrading to the problem folder remains, what should I do?

  5. viki sangre says

    I have the same issue. I have made no changes to my website but when I saw my website in the morning it show white blank screen. I haven’t updated any plugin.

    Backend is working well.

    Any help please!!

    • viki sangre says

      I updated my wordpress with latest version and every things gonna fine. I think automatically updation of wordpress also cause a problem.

  6. Hansel says

    Hi Guys,

    I got some white space page issue in our wordpress page and did below troubleshooting but still no luck. It’s also weird that I don’t get any error.log that’s why it’s kinda hard to know the exact issue. Any help would be very much appreciated. Thanks Guys.

    Troubleshooting made:
    Disabled all plugins
    tried to use the default theme
    restarted apache2

  7. Sabina says

    Please help!!! I think I’m gonna die! I get the white screen and I cannot get to my admin page. Everything is white :(:(:( Please, please tell me step by step what I should do not to mess things even more!
    Thank you!

  8. Naomi says

    I experienced the white screen of death tonight and I couldn’t access my login, website, or any of the pages. I fixed it by going to hosting site and pulling up the file manager. I was able to edit the code I had misplaced through the files on the hosting site and then my site came back up!

  9. Lee Binder says

    In our case it was problems with cron, either WP cron or the server’s cron service. “Fixed”/ worked-around with the WP Delay Cron Plugin

  10. Thomas says

    Hi all, I have the same error but cant even access the login page for my site! Any ideas on what i could do? Thanks!

    • calvin says

      I had the same issue, it was a plugin. went to the cpanel, then file manager, public html folder and on right side, right click on “error log” to view error. Plugin causing error was renamed and whala… I could get to the dashboard.

      Hope this helps you and others!

  11. Bomi says

    This should be the firt option if you only have access to FTP, it will tell you exactly which file is messed up. Thanks.

    error_reporting(E_ALL); ini_set(‘display_errors’, 1);
    define( ‘WP_DEBUG’, true);

  12. Kay says

    I get an error message that says Site can nor be accessed. Disconnect site. When I click on admin the screen goes white. Please help!

  13. Andy says

    I had this problem with my installation (white screen only on WP-admin. I eventually solved it by using the debug tools in the browser (hit F12 in most browsers). Using the console view in the debug I could see that there was some sort of error in a frame that was being used.

    I haven’t got to the bottom of this yet but I was able to access the login page and access wp-admin by switching my re-directed URL for the raw IP address. I expect I have mucked up the re-direct in some way but I’m just relieved to have fixed it to be honest!

    Hope this helps someone else!

  14. Jacob J says

    The error reporting thing solved my problem. Knew I had a misplaced code in there somewhere, and those few lines in the config file showed me where. Thanks a lot. /Jacob

  15. dinesh Kumar says

    thanks a lot i found error wp_debug already defined and resolved this error and also installed new theme now my site is opening but i can’t access my admin page when i type admin url it’s showing it’s not redirecting properly

  16. Kaley Basham says

    Ok, so I replaced the theme by replacing the current_theme, template and stylesheet in PHPmyAdmin to twentyeleven and it fixed the white screen of death issue. Now I checked my functions.php document and I had no extra spaces in the end.

    So now what?!?!??? Thanks for any help!!

  17. Adria says

    THANK YOU SO MUCH! It was one of the Whatsapp Plug-ins which was causing an issue. I can now sleep peacefully tonight – my site is up and running again.

  18. Timothy says

    Thanks for this. I ran the error code and found a malicious file. link-template.suspected.

    I removed the file and replaced it with a new one that I had downloaded and that fixed.

    All this after going through every other thing to no avail.

    Replacing the bad file got things back.

  19. Hugo says

    The blank screen can also be caused by using the wrong version of php. PHP 5.2 has cause me trouble in the past, changing to 5.4 fixed it. Be sure to check this if all else fails.

    • Kelly says

      Another vote for PHP version. I tried almost everything and was about to replace the theme when I gave this a go. Upgraded to 5.5 and like magic, it was fixed! Thanks Hugo.

  20. Bobby says

    Coded my own theme and had blank screen when trying to update posts and pages, deleting spaces at the bottom of my functions file solved the issue! :)

  21. Jonas Holm says

    I went through all the above steps without succes. I downgraded PHP 5.6 to 5.3 on my providers PHP-admin-page. That solved my problem.

  22. Grace says

    I’ve read through all of this but sadly my problem is that I can’t even log on anymore – I got the white screen of death but it says that when you try to go onto my page and when I even try to go to the WordPress dashboard (via Godaddy). I now have absolutely no way to log on to my wordpress – not sure what to do!

  23. Tawanda says

    I just fixed this problem, it was a caching issue. If you go to your wp-config.php file then remove the code just above the define(‘DB_NAME’, ‘your_db_name’);

    This should work, as it worked for me

    • Jan Fallon says

      I had the WP CACHE code in my wp-config.php file – just above the define(‘DB_NAME’, ‘your_db_name’); as stated by TAWANDA and removed it – and so far my home page, which was completely white, is holding!

      I could log in via admin, and saw all my content, but at the URL the home page was white.

      FIXED with crossed fingers!

      Many thanks wpbeginner crowd!

      Jan

  24. Sam says

    Had this same problem when updating my wordpress plug-ins. I accidently clicked on a link while a couple of plug-ins were updating. The site was okay but could not get into the admin section. Log-in was blank. After reading this article tried changing the plug-ins file name. Admin was still blank and site now wouldn’t load. Change the plug-in folder back to its correct name.
    I didn’t delete the theme since this would be a headache to ressurect, I have text widget areas with code and all of this would delete. Instead skipped to the error fix, under “other suggestions” and placed the script in the wp-config.php file. An error popped up for a “google analytics plug-in”. I ftp’d in and changed the name of the folder for that plug-in which fixed the problem.
    I could now log-in to the admin area. I then checked the name of the plug-in and found the plug-in through the wordpress “new plug-in” feature. Loaded it in then deleted it. Did this to clear it out of the database. Haven’t reinstalled it yet. Enough headaches for one day ;)
    Hope this helps someone…

  25. Paola says

    I have a problem inside my WordPress admin panel. I can get in but then I get the
    white screen of death when I try to edit comments and the like and I cannot
    seem to get to use my dashboard. I have tried deactivating plugins and also
    re-installing a fresh copy of WordPress but this didn’t seem to help. I also tried replacing my
    current theme with a default twenty ten theme but that seemed difficult and I
    am not sure I was able to do so. The article also suggested
    using the WordPress debug function to see what type of errors are being
    outputted. I did manage to add the suggested code in my wp-config.php file and
    I got some messages but I am not very good with code so I don’t really
    understand what is being said. Any suggestions?

  26. Pat says

    I tried everything listed on this post to no avail. I finally found the
    fix for my situation! My problem was related to an older versions of
    WP: 3.3.1.

    I looked at the error_log file in the wp-admin
    directory and saw the following error: “PHP Fatal error: Access to
    undeclared static property: WP_Screen::$this in
    /home2/bellex/public_html/wp-admin/includes/screen.php on line 706”

    I had things setup using the WordPress debug function described above.

    Anyhow this error led me to a website that directed me on how to alter the screen.php file. See this site for details:
    http://wordpress.stackexchange.com/questions/127427/how-to-fix-empty-dashboard-issue-in-wordpress

  27. Veronca says

    Thanks a lot for the help. I add some code to my Cron Job. I deactivated all my network plugins and asked hostgator to increase my memory. The last thing I need is the white screen of death during production. My site has been down all day, but now its back up. THANKS AGAIN!!

  28. Bboo says

    Can I just delete the the entire theme file. And re-install it? Will that fix the white screen? I was working on the .php, but now looking at the files, i have NO IDEA which one i was in!!

  29. Bboo says

    How is everyone having to option to see pages?? When I login I ONLY see BLANK PAGE. No options, no links, no files. NOTHING!! Someone please help!!

  30. Morgan says

    I fixed my white screen of death by deleting the code I had written just before it crashed. I did that through the Bluehost file manager. I found my website file (the wordpress install file), then went into wp content, found the theme I was using, then opened the functions file (to fix the theme’s function .php file).

  31. Morgan says

    Hi, thank you for telling me what this is. I tried putting in the code from your how-to-avoid-no-thumbnail-issue-while-sharing-post-on-facebook post, and I’m sure I’ve corrupted a file doing something wrong. I can’t get anywhere, it’s all white. How do I disable plugins or go to a default theme this way? I’m going to lose so much work, aren’t I?!???

  32. Mark says

    Rather than deleting a potentially broken theme, you can just rename it. WordPress will still fall back to a default and it saves the bother of backing up & deleting.

  33. imLOST says

    I had extra spaces at the bottom of my functions.php file.

    After the closing ?> tag. Cleared them up and all was good! :D

  34. Hasan Shahzad says

    I have got it fixed by renaming plugins folder to plugin, WordPress deactivated my all plugins and I was able to access WP-Admin, I tried to activate all plugins manually, however one plugin returned fatal error while activating itself “(include_path=’.:/usr/lib/php:/usr/local/lib/php’)” Then I got it, that plugin was creating mess. Now my blog works fine.

  35. Beetzy Chase says

    Thank you for the article. I did fix my site. Your article just got my fix it thoughts going in the correct direction, nice reads like this make programming a little less lonely :-)

  36. gaurav says

    Hi Admin,

    please help

    Just Now I got an error. my wordpress site is not working even wp-admin also not working, i was doing some changes on footer and have done small change. after saving my wordpress editor. my site not opening and also wp-admin not opening,

    I am getting this error Parse error:

    syntax error, unexpected end of file in /home/content/p3pnexwpnas01_data02/60/2213460/html/wp-content/themes/fashionistas/functions.php on line 295

    i am using wordpress managed hosting from godaddy.

    When i am trying to open wordpress admin and my website. both are not opening, returning that error only .

    Please help.

    Thanks in advance

  37. Anindyo Yudhistiro says

    I have add

    error_reporting(E_ALL); ini_set(‘display_errors’, 1);
    define( ‘WP_DEBUG’, true);

    on my wp-config file, but still didn’t get the error..

Deixe um comentário para WPBeginner Support Cancelar resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.