Pular para o conteúdo
Ferramentas

WP_DEBUG Configurator

Turn on the debug log without breaking your live site

Roda no seu navegador. Nada é enviado.

Where is this site?

This changes the recommendation, not just the wording. The safe configuration on a live site is genuinely different from the useful one on your laptop.

Verdict

Options
wp-config.php

Paste these ABOVE the line that says /* That's all, stop editing! */ — anything below it is ignored, which is why so many people report that WP_DEBUG 'does nothing'.

Sobre o WP_DEBUG Configurator

Generate the WP_DEBUG constants that write errors to a log file instead of printing them to your visitors. The default WP_DEBUG snippet most sites copy will display PHP errors publicly — this one will not.

FAQ

Perguntas

É seguro habilitar o WP_DEBUG em um site no ar?

Só com o WP_DEBUG_DISPLAY definido como false. Sozinho, o WP_DEBUG imprime avisos e alertas do PHP — incluindo os caminhos absolutos de arquivo do seu servidor — direto nas páginas que seus visitantes carregam. Quase todo tutorial te entrega aquela única linha e para por aí. Combine-a com o WP_DEBUG_LOG e o WP_DEBUG_DISPLAY como false e ela fica segura.

Onde vai parar o log de debug do WordPress?

Em wp-content/debug.log por padrão. Vale saber: em muitas hospedagens esse arquivo é acessível publicamente — qualquer um pode requisitá-lo em um navegador. Você pode passar um caminho para o WP_DEBUG_LOG e escrever o log acima da raiz web, o que esta ferramenta vai gerar pra você.

Defini o WP_DEBUG como true e nada aconteceu. Por quê?

Quase sempre porque a constante foi adicionada ABAIXO da linha que diz "That's all, stop editing!" no wp-config.php. Tudo depois dessa linha é ignorado. Mova-a para cima.