This guide explains how to hide PHP warning notices from the WordPress dashboard, though Ecenica recommend upgrading to the latest PHP version first for better performance and security.
We Recommend Upgrading PHP First
Before hiding PHP warnings, we strongly recommend upgrading to the latest PHP version. Modern PHP versions offer:
- Better performance- Your WordPress website will load faster
- Enhanced security – Extra protection against vulnerabilities
- Improved compatibility – Works better with current WordPress, themes, and plugins
Upgrading PHP in Ecenica Hosting
Upgrading PHP is simple with Ecenica Hosting:
- Log into your Ecenica Dashboard
- Navigate to your plan and click Select PHP Version
- Select the latest available PHP version
- Click Apply or Save Changes
Your site will immediately start using the new PHP version.
For detailed instructions, see our guide: How to Update PHP Version in WordPress
When You Can’t Upgrade PHP
Sometimes upgrading isn’t possible due to compatibility issues with a specific theme or plugin. In this case, you may wish to hide PHP warnings in your WordPress Admin Dashboard while you work on finding an alternative solution.
Option 1: Steps to Hide the WordPress Dashboard PHP Warning
Add the following code to your theme’s functions.php file:
/* Hide PHP update notice in WordPress dashboard */
add_action('admin_init', function() {
remove_action('admin_notices', 'wp_dashboard_php_nag');
});
Option 2: Hide Site Health Status via Screen Options
If you simply want to hide the Site Health Status (which can display PHP-related notices) from your WordPress dashboard:
- Go to your WordPress Dashboard.
- Click the Screen Options tab at the top right corner.
- Uncheck the box next to Site Health Status.
Note: This only hides the widget from view. It does not disable the Site Health feature or resolve PHP-related issues.
Important: Hiding the dashboard warning doesn’t fix the underlying PHP compatibility issues. Where possible, we recommend addressing these problems as soon as possible for optimal site performance and security.
Need Help Updating Your Theme or Plugin?
If you’d like assistance updating your theme or plugin to be compatible with the latest PHP version, Ecenica offers WordPress development services. Our team can help ensure your site runs smoothly with modern PHP versions.