There is no list of PHP 8.5 deprecations that tells you whether your WordPress site is ready, because the answer depends on the twenty-odd plugins you happen to run and the theme somebody customised in 2019. What you can build in an afternoon is a test loop: a staging copy of the site running on 8.5 while production stays where it is, a log that captures every deprecation notice the code actually emits, and a rule for attributing each line to the directory that owns it. Then the version flip on production is a decision backed by evidence instead of a hope, and if it goes wrong the rollback is the same dropdown you used to go forward.
What you’ll accomplish
- Establish which EA-PHP versions this server actually offers, and which one this account’s vhost is really using — not which one the CLI reports.
- Stand up a staging vhost inside the same cPanel account that runs PHP 8.5 while production keeps running its current version.
- Capture PHP deprecation notices to a dedicated log file that only staging writes to.
- Drive front end, checkout, admin, WP-Cron and WP-CLI through the 8.5 lane and turn the resulting log into a ranked list of plugin and theme directories.
- Flip production, verify it, and know exactly how to put it back in under a minute.
Prerequisites
- A cPanel account with SSH access and WP-CLI available. Every version change here also has a cPanel UI equivalent, but the log analysis is far faster from a shell.
- EasyApache 4 with MultiPHP. This is the cPanel default on any current server. If the host runs CloudLinux with PHP Selector, versions live under
/opt/alt/php*instead and are chosen in a different interface — the loop is identical, only the paths change. - The
ea-php85package installed on the server. You cannot install it yourself from inside an account; that is a root-level EasyApache action. Step 1 tells you whether it is there. - Enough disk quota for a second copy of the files and a second database. Check before you start, not after
rsyncfills the account. - WordPress and WooCommerce versions the projects themselves consider supported on 8.5. Confirm against the WordPress requirements page and the PHP supported versions page first.
How it works
Under EasyApache 4, PHP version is a per-vhost property. Every domain, subdomain and addon domain in an account gets its own entry in MultiPHP Manager, its own PHP-FPM pool, and therefore its own interpreter binary. A subdomain of example.com can run ea-php85 while example.com itself keeps running ea-php83, in the same account, under the same Unix user, at the same time. That is the whole trick, and it is why this test costs an afternoon rather than a second server.
The second half of the mechanism is error capture. A deprecation notice is not an error — PHP keeps executing the request and returns a normal page. It is emitted at E_DEPRECATED level, and you only ever see it if error_reporting includes that level and log_errors is on with somewhere to write. Left at defaults, a WordPress site on a new PHP version looks completely fine while quietly generating thousands of notices per hour. Turning that stream on, pointing it at a file only staging touches, and then deliberately exercising the site is what converts “seems fine” into a list.
Two things about that list matter. A deprecation is non-fatal in the release that introduces it: the site is not broken today, it is on a clock. And the log only reports code paths you actually executed — a checkout you never ran contributes nothing. Coverage is your job, not the log’s.
Step-by-step
- See which PHP versions this server offers. EA-PHP packages install under
/opt/cpanel/, and any shell user can list them.
ls -d /opt/cpanel/ea-php*
Expected: one directory per installed version, for example /opt/cpanel/ea-php81 /opt/cpanel/ea-php82 /opt/cpanel/ea-php83 /opt/cpanel/ea-php85. If ea-php85 is missing, stop here and ask the host to add it — nothing below works without it.
- Confirm 8.5 runs and see what extensions it has. The extension set is per-version, and a missing extension is a fatal error, not a deprecation notice.
/opt/cpanel/ea-php85/root/usr/bin/php -v
diff <(/opt/cpanel/ea-php83/root/usr/bin/php -m) <(/opt/cpanel/ea-php85/root/usr/bin/php -m)
Expected: a version banner starting PHP 8.5., then a diff. Lines prefixed < are extensions your current version has and 8.5 does not — imagick, redis, igbinary and commercial loaders such as ionCube commonly lag a new PHP release. Anything in that list your stack needs is a blocker to raise with the host now, before you build staging.
- Find out what production is really running. The CLI answer and the web answer are different things, and the web answer is the one that matters.
grep -A3 'cPanel-generated handler' ~/public_html/.htaccess
Expected: an AddHandler application/x-httpd-ea-php83 .php .php8 .phtml line naming the version. If the command returns nothing, the vhost is served by PHP-FPM and MultiPHP Manager is the source of truth instead. Either way, get the ground truth over HTTP:
printf '%s\n' '<?php echo PHP_VERSION;' > ~/public_html/zz-phpver.php
curl -s https://example.com/zz-phpver.php; echo
rm ~/public_html/zz-phpver.php
Expected: a bare version string such as 8.3.19. Delete the file in the same breath you created it — the rm is part of the step, not an afterthought.
-
Create the staging vhost. In cPanel, add a subdomain such as
stage.example.comwith a document root ofstage, so files land in~/stagerather than insidepublic_html. Let AutoSSL issue its certificate, otherwise thecurlchecks below fail on TLS rather than on PHP. -
Clone files and database. Copy the files, create a fresh database and user in cPanel’s MySQL Databases area, then point the copy at them.
rsync -a --exclude 'wp-content/cache/' --exclude 'wp-content/uploads/' ~/public_html/ ~/stage/
cd ~/public_html && wp db export ~/wp-live.sql
cd ~/stage && wp config set DB_NAME acct_stagewp && wp config set DB_USER acct_stageusr && wp config set DB_PASSWORD 'the-password-you-just-set'
wp db import ~/wp-live.sql
wp search-replace 'https://example.com' 'https://stage.example.com' --all-tables-with-prefix --report-changed-only
Expected: rsync prints nothing on success, wp db export reports Success: Exported to ..., and search-replace ends in Success: Made N replacements. Excluding uploads/ keeps the copy small; media will 404 on staging, which is fine here. If you need images, symlink the directory instead of copying it.
- Make staging safe before it runs. A staging copy of a WooCommerce store will happily email real customers and charge real cards if you let it.
mkdir -p ~/stage/wp-content/mu-plugins
printf '%s\n' '<?php' 'add_filter( "pre_wp_mail", "__return_false" );' > ~/stage/wp-content/mu-plugins/zz-no-mail.php
cd ~/stage && wp option update blog_public 0
Expected: Success: Updated 'blog_public' option. — the discourage-indexing flag. Separately, put every payment gateway on staging into its own sandbox or test mode, and password-protect the subdomain in cPanel if the store holds customer data.
- Switch only staging to 8.5. In cPanel, open MultiPHP Manager, tick
stage.example.comalone, chooseea-php85, and apply. Leaveexample.comuntouched. Verify with the same HTTP check as before:
printf '%s\n' '<?php echo PHP_VERSION;' > ~/stage/zz-phpver.php
curl -s https://stage.example.com/zz-phpver.php; echo
rm ~/stage/zz-phpver.php
Expected: a string starting 8.5.. If it still reports the old version, the change did not apply to the vhost you think it did — recheck the selection before going further.
- Turn on deprecation capture, staging only. WordPress controls
error_reportingitself whenWP_DEBUGis on, so set it throughwp-config.phprather than fighting it.
mkdir -p ~/logs
cd ~/stage
wp config set WP_DEBUG true --raw
wp config set WP_DEBUG_DISPLAY false --raw
wp config set WP_DEBUG_LOG "$HOME/logs/php85-deprecations.log"
wp config get WP_DEBUG_LOG
Expected: the last command echoes the absolute log path. With WP_DEBUG true, WordPress sets error_reporting to E_ALL, which includes E_DEPRECATED, and with WP_DEBUG_LOG set to a path it sends the stream to that file instead of dropping an error_log file next to whichever script produced the notice. WP_DEBUG_DISPLAY false keeps it all out of the rendered page.
For requests that never boot WordPress — a plugin endpoint hit directly, a leftover installer script — add a .user.ini in the staging document root:
error_reporting = E_ALL
display_errors = Off
log_errors = On
error_log = /home/acct/logs/php85-deprecations.log
PHP caches .user.ini files, so allow up to five minutes before assuming it did not take.
- Drive real traffic through the 8.5 lane. An empty log after browsing three pages means nothing. Cover the front end broadly, then the paths that only run under specific conditions.
cd ~/stage
wp post list --post_type=page,post --post_status=publish --field=url > ~/stage-urls.txt
wc -l < ~/stage-urls.txt
while read -r u; do curl -s -o /dev/null -w "%{http_code} $u\n" "$u"; done < ~/stage-urls.txt | grep -v '^200 '
Expected: the count, then no output from the last command — every URL returned 200. Any line that appears is a URL to open in a browser.
Then the paths a crawler never reaches: log into the staging admin and visit the dashboard, the plugins screen, Woo’s orders and reports screens, and the block editor on a real page. Add a product to the cart and complete a sandbox checkout end to end. Finally, exercise cron and the CLI on the 8.5 binary specifically:
cd ~/stage
wp cron event list --fields=hook,next_run_relative
/opt/cpanel/ea-php85/root/usr/bin/php ~/wp-cli.phar cron event run --due-now
/opt/cpanel/ea-php85/root/usr/bin/php ~/wp-cli.phar core verify-checksums
Expected: a table of scheduled hooks, then Success: Executed a total of N cron events. and Success: WordPress installs verify against checksums. Calling the 8.5 binary by absolute path matters: a plain wp runs on whatever CLI PHP the account defaults to, which is usually not the version you just assigned to the vhost.
- Read the log and attribute every line. Raw line counts are noise. Ownership is signal.
grep -c 'PHP Deprecated' ~/logs/php85-deprecations.log
sed -n 's#.* in \(/[^ ]*\) on line [0-9]*.*#\1#p' ~/logs/php85-deprecations.log \
| sed -n 's#.*/wp-content/\(plugins\|themes\|mu-plugins\)/\([^/]*\)/.*#\1/\2#p' \
| sort | uniq -c | sort -rn
Expected: a total, then a ranked list such as 412 plugins/old-slider, 88 themes/acme-child, 3 plugins/some-gateway. That list is the actual deliverable of this whole exercise. To read the distinct messages for one owner:
grep '/wp-content/plugins/old-slider/' ~/logs/php85-deprecations.log \
| sed 's/.*PHP Deprecated: *//' | sort -u | head -20
- Decide per owner, not per line. Four hundred notices from one plugin is one decision, not four hundred.
Work the ladder top down for each directory in the ranked list, then re-run steps 9 and 10 after each round of updates and fixes. The loop ends when the log names nothing you have not consciously accepted.
- Flip production, then verify immediately. MultiPHP Manager, tick
example.com, chooseea-php85, apply. Then:
curl -s -o /dev/null -w '%{http_code}\n' https://example.com/
printf '%s\n' '<?php echo PHP_VERSION;' > ~/public_html/zz-phpver.php
curl -s https://example.com/zz-phpver.php; echo
rm ~/public_html/zz-phpver.php
Expected: 200, then a string starting 8.5.. Rollback is the same screen with the old version selected; it takes effect on the next request, and nothing in your files or database changed to make it complicated.
Validate it works
Do these in order, on production, within ten minutes of the flip.
curl -s -o /dev/null -w 'home %{http_code} %{time_total}s\n' https://example.com/
curl -s -o /dev/null -w 'cart %{http_code}\n' https://example.com/cart/
cd ~/public_html && wp core verify-checksums && wp plugin list --status=active --field=name | wc -l
find ~/public_html -maxdepth 3 -name 'error_log' -newermt '-15 minutes'
Expected: 200 on both URLs with a time_total in the range you saw before the flip, a checksum success, the same active-plugin count as yesterday, and no output from find. That last one is the real check — a freshly written error_log under the document root means PHP started complaining the moment you flipped. Then place one genuine small order and watch it complete.
Troubleshooting
The log file stays empty and you do not believe it. Prove the pipe works with a deliberate notice rather than trusting silence.
printf '%s\n' '<?php trigger_error( "canary", E_USER_DEPRECATED ); echo "ok";' > ~/stage/zz-canary.php
curl -s https://stage.example.com/zz-canary.php; echo
grep canary ~/logs/php85-deprecations.log
rm ~/stage/zz-canary.php
If ok prints but nothing lands in the log, the .user.ini has not taken effect yet or the path is not writable. If canary appears, the pipe is fine and the site genuinely emitted nothing on the paths you exercised — which usually means your coverage was thinner than you thought.
The log grows to gigabytes overnight. One hot code path can emit the same notice on every request, and an unbounded log fills the disk quota and takes the site down. Watch the size, dedupe with sort -u before judging severity, and truncate with : > ~/logs/php85-deprecations.log between rounds so each log describes only that round.
Staging shows a white screen with nothing in the deprecation log. That is a fatal error, not a deprecation — most often a missing extension on 8.5, which step 2 was meant to catch. Compare /opt/cpanel/ea-php85/root/usr/bin/php -m against your current version’s module list again, and look for the fatal in the FPM error log the host exposes.
WP-CLI reports a different PHP version than the site. Expected, not a bug. The CLI binary and the vhost’s FPM pool are independent. Always call the version you mean by absolute path when the version is what you are testing.
Everything passed on staging and production still broke. Look first at what staging did not have: real media in uploads/, real gateway credentials, real cron volume, an object cache, a CDN in front. Those differences are where a passing staging test loses its predictive value, which is why the flip is followed by ten minutes of watching.
When this is the wrong approach
If the site is a Composer-managed application rather than a plugin-and-theme WordPress install, static analysis on a workstation finds far more, far earlier, than a runtime log ever will — the PHP 8.4 upgrade guide walks that order with PHPStan and a parallel FPM pool.
If the account is on shared hosting with no MultiPHP control and no shell, none of this is available to you, and the honest move is to ask the host what they offer and when.
If the site is currently on PHP 7.4 or 8.0, do not aim at 8.5 in one jump. The intermediate versions each introduced changes that are cheaper to absorb one at a time, and the pre-bump compatibility check covers the shorter version of this work for a single-step move.
And if the reason for the upgrade is speed rather than support lifetime, measure first. A minor version bump is rarely worth as much as a properly configured object cache, and this loop tells you nothing about performance — only about what your code complains at.
The version you land on should be a decision, not an accident; PHP version strategy for a cPanel fleet covers how to set a default across many accounts once you have proved one.
Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.