WordPress
WordPress PHP version: how to change it safely
WordPress runs on PHP, but the application is only one part of the compatibility chain. Themes, plugins, custom code, PHP extensions, and hosting configuration all need to work on the target version.
Inventory the current runtime first
Record the active PHP version, extensions, memory and execution limits, WordPress version, theme, and important plugins. If the site has custom code, include that in the compatibility review.
Update the application before changing the runtime
Old plugins or themes may depend on behaviour removed from newer PHP releases. Bringing supported components current before the runtime change reduces the number of variables you troubleshoot at once.
Test the paths that execute real work
Check administrator actions, forms, ecommerce checkout, image processing, cron jobs, imports, API integrations, and anything else that executes PHP. Cached public pages can hide a runtime failure.
Have a fast rollback path
Know how to return to the previous supported PHP version while you investigate. If a component is incompatible, replace or update it rather than leaving the site indefinitely on an obsolete runtime.