---
title: Fix errors showing on the frontend
canonical: https://wpsecurityninja.com/docs/errors-and-debugging/fix-errors-showing-up-frontend/
---
PHP notices, warnings, and fatal messages should not appear on the public site. If they do, tighten `wp-config.php` display settings.

## Hide errors on the front end

```php
ini_set( 'display_errors', 'Off' );
define( 'WP_DEBUG', false );
define( 'WP_DEBUG_LOG', false );
define( 'WP_DEBUG_DISPLAY', false );
```

Replace any existing conflicting definitions with the lines above.

## Log errors without showing them

```php
ini_set( 'display_errors', 'Off' );
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
```

Errors go to `/wp-content/debug.log`. Access that file over FTP or the host panel. Turn logging off when you finish, and delete or protect the log file.

Notices and warnings rarely stop the site. Fatal errors do. See [How to use WP_DEBUG](https://wpsecurityninja.com/docs/errors-and-debugging/finding-errors-and-solutions/).
