Hi @nicelydunn
Thanks for alerting us to this. We are currently, carrying out an investigation on this and find out if it is being caused by FooGallery.
For now, to prevent deprecation messages from being displayed on your WordPress site, you can modify the error reporting settings in your WordPress configuration or PHP settings. These messages are mainly intended for developers and shouldn’t be shown on a live site, especially in production environments such as yours.
Here’s how you can disable the display of these messages:
1. Update wp-config.php
File:
You can control the error display in WordPress by modifying the wp-config.php
file, which is located in the root directory of your WordPress installation. Steps:
- Open your
wp-config.php
file in a code editor or via your hosting file manager.
- Add or modify the following line to disable error display:
define('WP_DEBUG', false);
If you need to disable logging in addition to the display, you can also add:
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', false);
WP_DEBUG
: Setting this to false
disables all debugging and error reporting.
WP_DEBUG_DISPLAY
: Controls whether debug messages are displayed on the site. Setting it to false
hides these messages.
WP_DEBUG_LOG
: Controls whether WordPress logs errors to a debug.log
file. You can set it to false
if you don’t want to log errors.
2. Modify PHP error_reporting
Settings:
If you prefer more fine-grained control over which error messages are displayed, you can change the error_reporting
level in the PHP configuration file. Steps:
- Locate the PHP configuration file (php.ini). This file controls global PHP settings.
- Find the
error_reporting
directive and set it to exclude deprecation messages:
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
This setting will report all errors except deprecation warnings and notices.
- If you don’t have access to php.ini, you can add the following code to the top of your
wp-config.php
file to adjust error reporting in WordPress:
@ini_set('error_reporting', E_ALL & ~E_DEPRECATED & ~E_NOTICE);
3. Server-Level Configuration (Optional):
If you’re using a hosting provider, you might also have options in your control panel (like cPanel) to change error reporting settings for PHP. You can turn off the display of errors from there as well.
Important Notes:
- Disabling error messages on a live site is crucial for security and user experience.
- You can still log errors by keeping
WP_DEBUG_LOG
set to true
while hiding them from the front-end with WP_DEBUG_DISPLAY
set to false
. This way, you can monitor issues without exposing them to visitors.
Thanks.
Regards,
Elvis