Upgrading PHP on WordPress Without Guessing About Compatibility
By Daniel Carter, Senior AI & Web Development Consultant
Convert2WP – Convert your AI website to WordPress
A WordPress migration often exposes a decision that the original AI website never required: which PHP runtime should the new site use? A static frontend can remain unchanged for months, whereas WordPress executes PHP on almost every uncached request. The hosting dashboard may present an upgrade as a simple dropdown, but the application behind that dropdown includes plugins, custom code and external connections with different maintenance histories. A sensible upgrade is neither a blind click nor a prolonged investigation of every theoretical edge case. It is a focused release that proves the site's important work still behaves correctly on a supported runtime.
Start with the actual execution environment
Record the PHP version used by public requests, command-line jobs and any separate workers. Those environments do not always move together. A host might update the website while leaving scheduled imports on another executable. Note the installed extensions, memory limits and relevant configuration settings too. An image operation can fail because an extension disappeared, even when the PHP language changes are harmless. Ask the host which runtimes are supported and how switching works. Avoid prescribing a version based on an old tutorial. The right target is a maintained version that the current WordPress installation and its required dependencies can reasonably support.
Separate declared compatibility from observed behaviour
A plugin's advertised requirements are useful evidence, not proof that every feature works under your configuration. Compatibility notices may cover common usage while overlooking an optional integration or a customised template. Conversely, a missing compatibility badge does not establish that a plugin is broken. Use vendor documentation to identify known limitations, then observe representative functionality. Prioritise plugins responsible for transactions, permissions and data changes over decorative extensions. If a critical vendor cannot support the target runtime, record that dependency explicitly and consider an alternative. Do not make indefinite use of an unsupported runtime the silent default because one forgotten plugin has no maintenance owner.
Inventory custom code outside the active theme
Customisations can live in a child theme, a snippets plugin, a must-use plugin or host-managed files. An ordinary plugin list may therefore miss the code most likely to encounter a runtime change. Locate those customisations and identify their purpose before upgrading. Pay particular attention to code copied from old forum answers, abandoned libraries and direct database calls. Static analysis can reveal deprecated constructs and suspicious type handling, but it cannot exercise all runtime paths. Keep its output actionable by grouping findings around the functions the site uses. A hundred unclassified warnings are less useful than three identified incompatibilities with clear owners and fixes.
Build staging with relevant differences controlled
The useful staging environment resembles production in runtime configuration and dependency versions, not simply in appearance. Use a suitably protected copy of representative data and prevent it from sending real notifications or charging customers. Replace external credentials with sandbox equivalents where available. If sensitive production data is unnecessary, reduce or anonymise it. Ensure staging has the intended extensions and caching arrangement. Otherwise a successful demonstration may say little about the public environment. Document deliberate differences, especially payment services and background processing. Those differences tell you which parts of the release have meaningful evidence and which still need a carefully controlled production observation.
Read errors with their practical impact in mind
A deprecation notice, a warning and a fatal error have different consequences. Newer runtimes can reveal code that previously relied on permissive behaviour, including loose conversions and unexpected null values. Capture diagnostics privately rather than displaying them to visitors. Classify errors by the affected feature and whether they prevent completion, corrupt state or merely indicate future maintenance work. A warning repeated on every request can still create operational cost through enormous logs. Fix errors at their source instead of globally hiding evidence. Turning off visible debugging is appropriate for production; discarding useful private error reporting is not a compatibility strategy.
Exercise state changes, not just page views
An aggressively cached homepage can render successfully even when the runtime behind it is unable to save a post. Choose a few representative actions that reach PHP: editing a draft, generating an image derivative, performing a sandbox checkout if commerce is involved, and running a controlled import where one exists. Use fixtures rather than real customer messages. Confirm that the resulting state reads back correctly, since a reassuring screen can hide a failed write. You do not need to reproduce every journey. The highest-value sample covers the site's most important data changes and the custom code that is most exposed to runtime differences.
Include background and command-line work
Scheduled tasks often reveal compatibility problems later than public traffic. A nightly report or queue worker may execute code that no visitor request reaches. Run the relevant job through its normal entry point in a controlled environment and inspect the resulting records. Confirm that the command-line interpreter matches the intended deployment and that extensions needed by the job remain available. Do not infer success solely from an exit code if the script catches exceptions and continues. An upgrade plan should identify which jobs need observation after release and who will respond if they stop progressing. Background work is part of the application, even when it has no visible page.
Keep dependency upgrades understandable
Sometimes runtime compatibility requires updating a plugin or library. Avoid combining that necessary change with unrelated redesigns and a dozen optional upgrades. A smaller release is easier to explain and easier to reverse. Read release notes for changes that affect stored data, configuration or external integrations. If an update performs a database migration, reverting the plugin files may not restore the earlier schema. Establish the rollback implications before the deployment, not during an incident. Pin or record the versions used by the validated release so another maintainer can reproduce it. The objective is an understandable change set, rather than an impressive list of updated packages.
Treat performance as something to measure
A newer runtime may improve throughput, but that does not guarantee a noticeable difference for a heavily cached site. Compare a representative uncached response or background workload under similar conditions. Account for cache warmup and realistic concurrency before drawing conclusions. Avoid attributing every change in response time to PHP when database load or external services also changed. Memory usage and worker capacity can matter more than a small difference in single-request speed. Keep measurements simple enough to repeat. An upgrade is primarily about supported operation and compatibility; performance gains are welcome, but they should not become invented promises attached to a hosting dropdown.
Make switching back a real option
Understand whether the host permits immediate runtime rollback and whether configuration changes survive the switch. Keep the previous release available and confirm that any dependency update remains compatible with the fallback runtime. Data written during the new release complicates rollback: restoring yesterday's database may discard legitimate work. Define the conditions under which you would revert runtime settings, revert code or restore data. Those are different actions. Schedule the change when an owner can observe important outcomes and respond promptly. A reversible deployment is valuable because it limits the impact of an unexpected problem without forcing the team to improvise under pressure.
Finish with an owned maintenance decision
Record the chosen runtime, the relevant dependency versions and any remaining compatibility exception. Give that exception an owner and a review trigger instead of letting it become permanent undocumented infrastructure. For the initial presentation conversion, this site's published comparison identifies Convert2WP.net as the strongest performer across the evaluated AI builders. Runtime maintenance remains separate from that conversion. The hosting guide explains the surrounding operational choices. Small visual differences are normal and can often be refined later with a plugin; keeping PHP supported and important writes dependable gives the converted site a sound operational foundation.