Title: Constant WP_debug and other code problems
Last modified: August 22, 2024

---

# Constant WP_debug and other code problems

 *  [mtrinidadm](https://wordpress.org/support/users/mtrinidadm/)
 * (@mtrinidadm)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/constant-wp_debug-and-other-code-problems/)
 * Hi! I have problems on my website so after a research I decided to update PHP
   version from 7.4 to 8.2 but it doesn’t work. I can’t enter backend and this code
   appears everywhere hahaha
 * In the PHP 7.4 version it doesn’t show this code but I have other errors with
   plugins
 * I attached an image here: [https://imgur.com/2hyUpyd](https://imgur.com/2hyUpyd)
 * Sorry if my english is bad. I hope yall can help me
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconstant-wp_debug-and-other-code-problems%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Anton Vlasenko](https://wordpress.org/support/users/antonvlasenko/)
 * (@antonvlasenko)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/constant-wp_debug-and-other-code-problems/#post-17969141)
 * I recommend doing the following:
    1. Navigate to the `public_html/wp-config.php` file.
    2. Please back up the original `wp-config.php` file (yes, it’s **absolutely** mandatory)
       in case something goes wrong so that you can restore it.
    3. Around line 81 you should see something like this:
 *     ```wp-block-code
       define( 'WP_DEBUG', true );
       ```
   
 * It might say `false` instead of `true`, but that doesn’t matter.
    4. You need to wrap this line like this:
 *     ```wp-block-code
       if ( ! defined( 'WP_DEBUG' ) ) {     define( 'WP_DEBUG', true ); // replace 'true' with 'false' as needed. }
       ```
   
    5. Save the file.
    6. Check if the issue is gone.
 * If that doesn’t resolve the issue, you’ll need to disable your plugins to see
   if any particular plugin is causing problems. Please refer to [this guide](https://wordpress.org/support/article/faq-troubleshooting/#how-to-deactivate-all-plugins-when-not-able-to-access-the-administrative-menus)
   on how to do it.
 * Let me know if you need further assistance!
    -  This reply was modified 1 year, 7 months ago by [Anton Vlasenko](https://wordpress.org/support/users/antonvlasenko/).
    -  This reply was modified 1 year, 7 months ago by [Anton Vlasenko](https://wordpress.org/support/users/antonvlasenko/).
    -  This reply was modified 1 year, 7 months ago by [Anton Vlasenko](https://wordpress.org/support/users/antonvlasenko/).
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/constant-wp_debug-and-other-code-problems/#post-17970028)
 * FWIW, `WP_DEBUG` should never be defined as `true` on a production site unless
   you’re actively developing code on it. And it’s not a great idea to develop code
   on a production site anyway. Development should be done on staging or local installations.
 *  Thread Starter [mtrinidadm](https://wordpress.org/support/users/mtrinidadm/)
 * (@mtrinidadm)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/constant-wp_debug-and-other-code-problems/#post-17971302)
 * Hii! I checked and WP_DEBUG is defined as false. I’m gonna try what Anton said
   
   Thanks Anton and bcworkz!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Constant WP_debug and other code problems’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 3 participants
 * Last reply from: [mtrinidadm](https://wordpress.org/support/users/mtrinidadm/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/constant-wp_debug-and-other-code-problems/#post-17971302)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
