This episode of the Jukebox Podcast on WP Tavern features Milan Petrović, a WordPress developer who’s been active since 2007. Milan runs Dev4Press and recently joined Freemius as a full‑stack developer. His WordCamp Europe talk focused on the security and performance risks of running legacy PHP in WordPress sites, and why moving to modern PHP (PHP 8.x and beyond) should be a priority for developers, hosts, and site owners.
Why PHP version matters
Many WordPress users see a PHP version number in a control panel but don’t appreciate its practical impact. Milan explains that newer PHP releases do more than add features: they close language‑level vulnerabilities, introduce safer behaviors by default, and deliver substantial performance and memory improvements. Those changes can neutralize entire classes of exploits — for example, authentication bypasses or server‑side request forgery — that easily affect sites running older PHP branches.
The cost of compatibility
WordPress’ long commitment to backwards compatibility helped its adoption but also slowed upgrades. Core and plugin ecosystems still need to support many older PHP versions because millions of sites run on them. That wide support is useful, but it leaves a large attack surface: Milan cites thousands of open, confirmed bugs affecting older PHP branches that will never be fixed. Publicly documented bugs become recipes for automated exploitation, so remaining on end‑of‑life PHP is effectively inviting attacks.
Hosts, libraries, and the upgrade blockers
Hosting providers play a decisive role. Managed hosts that push newer PHP versions can rapidly improve security and speed for their customers, and modern PHP can reduce memory use and increase throughput — freeing resources and lowering costs. That said, upgrading servers requires investment and careful support, because changes can break legacy plugins or custom code.
Third‑party libraries also drive upgrades. Many libraries have already raised their minimum PHP requirements to 8.x to use newer language features and security fixes. If your plugin depends on such a library, you may be forced to upgrade PHP anyway.
Why PHP 8 helps
PHP 8 introduced important safeguards and modern language constructs that make secure coding easier and more reliable. Beyond closing specific vulnerabilities, newer PHP versions support stricter typing, attributes, and other patterns that reduce common mistakes. Milan notes dramatic performance jumps across PHP versions: newer releases can be tens of percent faster and use significantly less memory for the same code path.
Vulnerability Lab plugin: a teaching tool
To demonstrate these differences, Milan created the Vulnerability Lab plugin. It contains examples that behave differently depending on the PHP version. Running the plugin on older PHP can reproduce exploitable behaviors or fatal errors, while running it on modern PHP shows how the same code can be made safe. The plugin is aimed at developers and agencies as a way to explain risks to clients and to test how code will behave across PHP versions. It’s available on GitHub, and Milan plans to expand it with more patterns and examples.
Practical advice: how to move forward
Milan’s recommendation is incremental modernization, not an all‑at‑once rewrite. Steps he suggests:
– Start requiring a newer minimum PHP for new projects (many developers now target 8.0+).
– Make small code updates such as stricter typing, replacing deprecated functions, and adopting safer PHP constructs.
– Test plugins and themes on newer PHP versions in staging environments before promoting changes to production.
– Hosts should offer clear upgrade paths and communication so site owners aren’t surprised when something breaks.
– Use the Vulnerability Lab and similar tools to demonstrate issues to nontechnical stakeholders and clients.
A combined approach is best: keep using WordPress core security practices like escaping and sanitization, and also embrace the language‑level protections and performance of modern PHP.
Where to learn more
Milan recommends following the official PHP site for upcoming releases and change logs, tracking WordPress resources for ecosystem guidance, and reviewing third‑party library requirements that may force upgrades. The podcast show notes at wptavern.com/podcast include links to Milan’s WordCamp presentation on WordPress.tv and the Vulnerability Lab GitHub repository. Milan is open to contact via the links provided in those resources for pointers and contributions.
Bottom line
Running end‑of‑life PHP significantly increases security risk and limits performance. While WordPress’ need to support a diverse user base makes immediate shifts difficult, gradual adoption of PHP 8.x features across core, plugins, and hosting platforms will reduce vulnerabilities, improve efficiency, and make the WordPress ecosystem more resilient. Milan’s message: start small, test thoroughly, and use the modern PHP toolset to build plugins and sites that are secure by design.