In a recent Jukebox Podcast interview, developer Milan Petrović laid out a stark warning: running legacy PHP on WordPress sites is a growing security and performance liability. With nearly two decades in the WordPress ecosystem—building plugins, running Dev4Press, and now working as a full‑stack developer at Freemius—Milan has watched both WordPress and PHP evolve. His message is simple but urgent: modernize your PHP stack, and do it thoughtfully and gradually.
Why PHP version matters
Many WordPress users notice a PHP version number in their hosting control panel without understanding its consequences. PHP versions change the language itself: newer releases bring performance optimizations, memory improvements, and language features that reduce the risk of common vulnerabilities. PHP 8 was a major milestone, bringing native protections and patterns that can neutralize entire classes of exploits that were easy to trigger in older PHP branches.
The risk of staying on old PHP
Milan points to a worrying reality: thousands of open bug reports exist for older PHP branches like PHP 7 and even PHP 5, and many WordPress sites still run those versions. Those publicly documented bugs provide attackers with a detailed playbook. While some hosting providers maintain custom patched builds of PHP, such customizations can introduce their own quirks and hidden risks. The safest path for most sites is to rely on officially supported PHP releases and to move forward rather than remain years behind end-of-life versions.
Backward compatibility vs. security
WordPress’s long-standing commitment to backward compatibility helped drive its adoption. It allowed users and hosts to avoid frequent server upgrades and made WordPress accessible to non-technical customers. However, that same policy has also slowed the adoption of newer PHP features inside core and among plugin authors. Milan suggests that a policy shift—declaring a modern PHP version as the minimum supported—would encourage developers and hosts to update and would open the door for safer, stricter coding patterns across the ecosystem.
What modern PHP buys you
– Security: Newer PHP versions include language-level protections and runtime changes that neutralize many legacy exploits, such as certain authentication bypasses and server-side request forgery patterns.
– Performance: PHP 8.x continues to improve execution speed and reduce memory usage; Milan notes that PHP 8.5 is significantly faster and more memory-efficient than PHP 7.4. This translates to lower hosting costs and the ability to serve more sites with the same resources.
– Developer ergonomics: Features like stricter typing, attributes, and other modern language constructs make code clearer and less error-prone—reducing the surface for vulnerabilities.
Why migration is hard
Upgrading a site’s PHP version is not always simple: plugins or custom themes written years ago may break under stricter runtimes. Managed hosts that push updates face support burdens when customer sites suddenly fail. Some site owners treat their WordPress install like a bicycle that “just works” and resist maintenance. Milan argues that upgrades don’t need to be radical or immediate—instead they should be steady, incremental, and well-tested.
A practical tool: Vulnerability Lab plugin
To illustrate the differences between PHP versions, Milan created the Vulnerability Lab plugin. It’s targeted primarily at developers and agencies: the plugin runs small, demonstrative code patterns that behave differently on older and newer PHP releases. In practice it can show how the same code might fail, produce errors, or be exploitable on PHP 7.4 while being neutralized or more efficient on PHP 8.x. One example in the plugin demonstrates both improved security and dramatically lower memory usage when run on a newer PHP version.
The plugin is open source and available on GitHub. Milan envisions expanding it into a pattern library: documented examples of legacy patterns and their modern equivalents, annotated with the PHP version that introduces each improvement. Agencies can use such demonstrations to persuade clients that upgrading PHP is necessary, not optional.
A combined approach to security
Milan stresses that upgrading PHP is not a silver bullet. WordPress core practices—escaping, sanitization, capability checks, and other security hardening—remain essential. The goal is a combined approach: continue applying WordPress best practices while migrating code to leverage modern PHP features that reduce risk and improve resilience.
How to move forward
– Start small and iterate: adopt stricter typing and modern functions in parts of your codebase rather than attempting a full rewrite.
– Test carefully: use staging environments with the target PHP version to find and address compatibility issues before touching production.
– Monitor third-party library requirements: many PHP libraries now demand newer PHP versions, and using up‑to‑date libraries may force (or justify) an upgrade.
– Host and developer collaboration: hosts can phase upgrades and provide clear migration support; developers should clearly state minimum PHP requirements for plugins and themes.
Where to learn more
Milan recommends php.net for authoritative information on upcoming PHP features and version timelines. Tracking official change lists helps developers know what features and protections are available and in which versions. For WordPress-focused patterns and community efforts, Milan’s GitHub-hosted Vulnerability Lab is a practical place to see concrete examples and contribute.
Final word
The tension between ease-of-use and security is central to WordPress’s growth story. Milan’s plea is not to abandon that accessibility but to lead a gradual, community-driven modernization. Adopting modern PHP versions yields immediate gains in security and performance, and a steady upgrade strategy—backed by tests, tooling, and clear communication—can bring millions of sites toward a safer future.

