Disable Debug Mode in Wordpress

Asked

Viewed 655 times

2

Problem

I have a template in Wordpress, which was working normally. At some point, without me changing anything, the following error started to appear at the top of the page:

 Debug Mode On
 Array ( [page] => 0 [ad_listing] => [..]

What do I want?

At the moment I am not too concerned about the error, as I can resolve it later but for now I would like to disable the debug, but I’m not getting it.

What I’ve already tried?

  1. Add define('WP_DEBUG', false); in wp_config.php
  2. Delete the line wp_debug_mode(); in wp_settings.php
  3. Search about desativar debug mode no wordpress, but I found nothing to help.
  4. Use define( 'SCRIPT_DEBUG', false ); and define( 'WP_DEBUG_DISPLAY', false); but a new error appears:

      Parse error: syntax error, unexpected '$table_prefix' (T_VARIABLE) in /home/barie742/public_html/recarga-de-toner-em-sao-paulo/wp-config.php on line 66
    

And on line 66 is: $table_prefix = 'wp_';

@EDIT

The error was happening by the lack of ;, but even after add them the DEBUG MODE ON keeps appearing.

Summary

I’d just like to disable the Debug Mode in Wordpress.

  • Already tried to use define( 'SCRIPT_DEBUG', false ); or define( 'WP_DEBUG_DISPLAY', false); ??

  • Exactly! Sorry I don’t give more details, I’m by the phone.

  • I updated the question @Giovannibernini, with the new error

  • The error appears at the top of the page, but continues to load the page normally? o define( 'WP_DEBUG_DISPLAY', false); made the same mistake as the define( 'SCRIPT_DEBUG', false ); ?

  • Yes @Giovannibernini, at the top of the page, it works normal, the link from the page is http://barietoner.com.br/recarga-de-toner-em-sao-paulo/

  • And both definition functions have not changed anything, it could be some function in the template itself that activates debug?

  • Strange! Try to put one @ini_set ( 'display_errors', 0); If not, send your wp_config.php without the connection data.

Show 3 more comments

1 answer

1


Solution:

This solution that I will put down is not one of the best, but as the define('WP_DEBUG', false);, define( 'SCRIPT_DEBUG', false ); and define( 'WP_DEBUG_DISPLAY', false); did not work, I would solve so:

Adding this CSS code in the main style.

.debug {
    display: none!important;
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.