Troubleshooting
WordPress Error Deprecated: Causes and How to Fix It

Short answer
A Deprecated message in WordPress is a warning that a plugin, theme or custom code uses an old PHP feature or WordPress function scheduled for removal. It does not crash the site. Hide it by turning off error display, then update or replace the code named in the message.
Key takeaways
- Deprecated notices are warnings, not fatal errors.
- They usually appear after a PHP or WordPress upgrade.
- The file path in the message names the plugin or theme responsible.
- Turn off error display on live sites and log notices instead.
- Update, report or replace the code rather than downgrading PHP.
What does the WordPress deprecated error mean?
A Deprecated message in WordPress is a warning, not a crash: it means a plugin, theme or custom code uses a PHP feature or WordPress function that still works today but is scheduled for removal.
You might see text like this at the top of a page or in the admin:
Deprecated: Creation of dynamic property Example::$name is deprecated in /wp-content/plugins/example/file.php on line 42
Or a WordPress-specific version:
Deprecated: Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
The message names the file and line that caused it. That tells you which plugin or theme to look at.
The site usually still works. But deprecated code can stop working after a future PHP or WordPress update, so it is a sign to update or replace something.
Why am I seeing deprecated messages now?
Deprecated notices usually appear after you upgrade PHP or WordPress, or after debug mode is switched on, because newer versions flag old code that earlier versions accepted silently.
There are two main triggers:
- A PHP upgrade: each new PHP version marks some old features as deprecated. Code that ran quietly on an older PHP version now produces notices.
- A WordPress update: WordPress marks old functions as deprecated when it adds better replacements, and reports any plugin that still calls them.
Notices only show on screen if error display is turned on. That happens when WP_DEBUG is enabled, or when the host's PHP settings display errors.
| Message style | Where it comes from | Example cause |
|---|---|---|
| Deprecated: Creation of dynamic property | PHP 8.2 and later | Old class code in a plugin |
| Deprecated: passing null to parameter | PHP 8.1 and later | Plugin passes empty values to PHP functions |
| Function X is deprecated since version Y | WordPress core | Plugin calls an old WordPress function |
| Hook X is deprecated | WordPress core | Plugin uses an old action or filter |
| Optional parameter declared before required | PHP 8.0 and later | Old function signatures |
Is the deprecated error dangerous?
No, a deprecated notice does not break your site or create a security hole on its own, but it signals outdated code that may fail in a later update and should be fixed.
Think of it as an early warning. The feature still works now, which is why it is a notice rather than a fatal error.
The real risks are indirect:
- Visible notices look unprofessional and can expose server file paths to visitors
- Notices printed before headers can cause headers already sent errors and break redirects or logins
- The code may stop working entirely after the next PHP or WordPress upgrade
So hide the notices from visitors right away, then fix the source when you can.
How do I hide deprecated messages from visitors?
Turn off error display on the live site by setting WP_DEBUG to false, or keep debugging on but send messages to a log file instead of the screen.
Open wp-config.php and look for the WP_DEBUG line. On a live site, use:
define( 'WP_DEBUG', false );
If you want to keep a record while you investigate, log errors without showing them:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
Messages then go to wp-content/debug.log. The WordPress debugging documentation explains each constant.
If notices still show with WP_DEBUG off, your host's PHP settings are displaying errors. Turn off display_errors in the host's PHP settings or ask support to do it.
Our guide on enabling debug mode in WordPress shows where to add these lines safely.
How do I find which plugin or theme causes it?
Read the file path in the message: the folder name after wp-content/plugins or wp-content/themes tells you exactly which plugin or theme triggered the notice.
For example, a path containing /wp-content/plugins/old-gallery/ points to a plugin called old-gallery.
If the message comes from WordPress core files instead, the notice usually still names the caller. WordPress's deprecation helpers, such as _deprecated_function, report which function was called.
When the path is not clear, use the Query Monitor plugin. It lists PHP notices and deprecated calls, along with the plugin or theme responsible.
You can also deactivate plugins one at a time on a staging site. Our guide on fixing a plugin conflict describes a safe process.
How do I fix the deprecated error for good?
Update the plugin or theme that causes it, because most developers fix deprecation notices quickly; if no update exists, contact the developer or replace the plugin.
Work through these steps:
- Update WordPress, all plugins and the theme.
- Check whether the notice is gone.
- If not, look at the plugin's changelog and support forum for a known fix.
- Report the full notice to the developer if nobody has yet.
- Replace abandoned plugins with maintained alternatives.
Plugins that have not been updated in a long time are the usual source. A notice is a good reason to look for a newer option.
For your own custom code, follow the message. It often names the replacement, such as Use WP_Query instead.
Should I downgrade PHP to stop deprecated warnings?
No, downgrading PHP only hides the problem and leaves the site on an older, less secure version; update or replace the code instead, and hide notices from visitors meanwhile.
Older PHP versions stop getting security fixes. The PHP supported versions page shows which branches are still maintained.
If a critical plugin truly breaks on a new PHP version, a short-term rollback can buy time. Set a deadline to replace or fix that plugin.
Before upgrading PHP in future, test on a staging copy. Our guide on updating the PHP version in WordPress explains how.
What do common PHP deprecation messages mean?
Most PHP deprecation notices come from a handful of changes in PHP 8.x, such as dynamic properties, null values passed to built-in functions and old function signatures.
Creation of dynamic property is deprecated came in PHP 8.2. Code assigns a property to an object without declaring it in the class first. The PHP 8.2 deprecation list explains the change.
Passing null to parameter of type string is deprecated came in PHP 8.1. A plugin passes an empty value to a built-in function that expects text.
Optional parameter declared before required parameter comes from older function definitions. It needs a small code change in the plugin.
These are all fixes for developers. As a site owner, your job is to update, report or replace.
Developers can scan code for these problems before upgrading with the PHPCompatibilityWP ruleset for PHP_CodeSniffer, which flags code that breaks on newer PHP versions.
If you want to check whether WordPress itself supports a newer PHP release, see our explainer on WordPress compatibility with PHP 8.5.
Can deprecated notices break my site?
Usually not directly, but if notices print before WordPress sends headers, they can break redirects, logins, AJAX requests and REST API responses.
The common symptom is a Cannot modify header information - headers already sent warning. The notice text went out first, so WordPress could not set cookies or redirect.
Another symptom is broken JSON in the block editor or in AJAX forms. Extra text in the response makes it invalid.
Turning off error display fixes these side effects at once. Then fix the source plugin when you can.
If a deprecated notice appears alongside a blank page, the real problem is likely a separate fatal error. Our guide to the white screen of death helps you find it.
How do I prevent deprecated errors in the future?
Keep plugins and themes updated, remove unused or abandoned ones, test PHP and WordPress upgrades on staging first, and keep error display off on the live site.
A short routine helps:
- Update plugins and themes weekly
- Delete plugins you no longer use
- Check how recently each plugin was updated before installing it
- Test PHP upgrades on a staging site
- Review your debug log after big updates
Our guide on setting up a staging site for WordPress shows how to test updates without risk.
Frequently asked questions
Can I ignore deprecated errors in WordPress?
You can hide them from visitors safely, but you should not ignore them forever. The code still works today, yet it may break after a future PHP or WordPress update. Update or replace the plugin or theme responsible when you can.
Why do deprecated messages show even with WP_DEBUG set to false?
Your host's PHP settings have display_errors turned on, which shows notices regardless of WordPress settings. Turn display_errors off in the host's PHP options, or ask support to disable it for your site.
Does a deprecated notice slow down my site?
A few notices have almost no effect on speed. Thousands of notices written to a log on every page load can add some overhead and fill disk space, so fix the source or keep logging off once you are done investigating.
Is deprecated the same as a fatal error?
No. A deprecated notice means code still works but uses something scheduled for removal. A fatal error stops the page from loading. Deprecated code can become a fatal error later if the old feature is removed completely.
Where is the WordPress debug log stored?
When WP_DEBUG_LOG is set to true, WordPress writes notices to a file called debug.log inside the wp-content folder. You can set a custom path instead. Delete or protect the file when finished, since it can reveal server details.
Sources
- Debugging in WordPress WordPress Developer Resources
- _deprecated_function() WordPress Developer Resources
- Deprecated features in PHP 8.2 PHP.net
- Supported Versions PHP.net
- Query Monitor WordPress.org
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


