PHP Deprecated Warnings in PHP 8.x: What They Mean
Your site shows messages saying that some of its code is outdated.
Which PHP version does your site report?
We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.
More about this
The site itself still works, so this is not an emergency, but it is an early warning: that code can stop working after a later PHPPHP is a programming language that builds your web pages on the computer that hosts your site, just before they reach the visitor. WordPress runs on it. update, and your site then goes down at a moment you did not choose.
Fixing it now, on your own schedule, avoids that.
A PHP deprecatedA deprecation is an early warning that a feature still works today but will be removed in a future PHP version, so code using it must be changed in time. warning is a notice that your code uses a feature that still works today but is planned for removal in a future PHP versionA PHP version is a numbered edition of PHP, like 8.3. Each edition is looked after for a limited time, then gets security fixes only, then nothing.. It does not stop your site by itself. It tells you that the code will probably break after a later upgrade, so it is worth fixing on your own schedule.
What the message means
A typical message reads: Deprecated: Function name() is deprecated, followed by the file and line. PHP prints the file and line number where the old feature is used. Deprecation is a warning stage.
The feature usually still runs, but the PHP project has told developers to stop using it.
Why you see them after an upgrade
Each new PHP 8 release deprecates a handful of older behaviours. Passing null to a function parameter that does not accept it, dynamic properties on classes, and some older string and date functions are common examples. Old themes, old plugins and custom code written for PHP 7 tend to trigger the most notices.
Seeing a lot of them right after an upgrade is normal.
Which ones matter
The notices are not all equally urgent. A notice that comes from a pluginA WordPress plugin is an add-on you install in WordPress to give your site extra features, such as contact forms, SEO tools or a webshop. you could replace is a low priority. A notice in code that handles payments, logins or forms deserves attention sooner, because a later PHP version may turn the old call into a fatal error.
If the same notice appears thousands of times, it also fills your log and can slow the site down.
How to check it safely
Take a backupA backup is a separate copy of your website's files and database, so you can bring the site back after a mistake, a hack or a failed update. first. Then read the PHP error logAn error log is a file where your website's software writes down what went wrong, with the time and place. It is the first thing to check when a site breaks. instead of showing errors on screen, because visible errors on a live site can reveal file paths to visitors. If you must turn on debug output, do it on a stagingA staging environment is a private copy of your website where you try updates first, so any mistakes happen there and not on the live site. copy of the site, not on the public one.
Note which file each notice points to, and check whether that file belongs to WordPressWordPress is free software for building and editing a website in your browser. It is written in PHP, so it builds each page when someone visits. core, a plugin, a themeA WordPress theme is a ready-made package that decides how your WordPress site looks and how its pages are laid out. Change the theme and the design changes. or your own code.
What you can try yourself
Work in this order. First, update WordPress, your plugins and your theme to their latest versions, since many authors have already fixed their deprecations. Second, replace any plugin that is no longer maintained.
Third, for your own code, replace the deprecated call with the recommended one from the PHP manual. Fourth, if the log is flooded and you cannot fix the code yet, lower error reporting for deprecation notices in the log settings as a temporary measure, and write down that you did so. Hiding notices does not fix the code, it only quiets the log.
When the PHP version is the cause
Deprecations are tied to the PHP version your server runs. Moving up a version brings new ones, and moving down hides them again, but staying on an old version means no security fixes once the PHP project drops support. Our page on supported PHP versions lists which versions the PHP project supports right now.
When to get help
If the notices come from code you cannot easily change, or you want the site checked before the next upgrade, get help early. A human at Website Without PHP replies within 1 working day. An emergency fix starts from £315, excluding VAT.