The go-to resource for learning PHP, Laravel, Symfony, and your dependencies.

WordPress Core Updates and PHP Compatibility


In 1880, the US Census faced a crisis. The previous decennial census had taken eight years to complete — and the next one was expected to take even longer. The solution came in the form of Herman Hollerith’s tabulation machine, which automated what had been manual labor. The machine didn’t enable anything workers couldn’t do themselves—it simply let them do it faster and more accurately.

Fast forward to today. WordPress powers over 75% of all websites, running on PHP — a language that itself evolved from Rasmus Lerdorf’s 1995 Perl scripts into the “PHP: Hypertext Preprocessor” we know now. But beneath WordPress’s polished admin interface lies a fundamental technical dependency: the PHP version your server runs. That version acts like Hollerith’s tabulation machine — it doesn’t change what WordPress can do in theory, but it directly determines whether your site actually will work after an update.

As of 2024, WordPress requires at minimum PHP 7.4, though PHP 8.1 or higher is recommended. Each major WordPress release pushes this requirement higher. When we click that WordPress update button, we might not realize that our PHP version — whether chosen by habit, hosting limitations, or simple uncertainty — could mean the difference between a successful upgrade and a catastrophic failure. This isn’t merely about maintaining current software versions; it’s about understanding a technical dependency that sits at the foundation of every WordPress installation.

In this guide, we’ll examine why PHP compatibility matters more than many WordPress administrators realize. We’ll walk through the process of checking your current PHP version, updating safely, and troubleshooting when things go wrong. By the end, you’ll have a clear understanding of how to keep your WordPress site secure, performant, and compatible with the PHP version you’re running — and you’ll know how to plan for future updates.

Why PHP Compatibility is Non-Negotiable

WordPress, strictly speaking, is written entirely in PHP. Every line of WordPress core code — every function call, every security check, every database query — executes within the PHP runtime environment. That makes PHP compatibility not just important but foundational. One may wonder: why does the exact PHP version matter so much? The answer involves three interconnected factors that directly affect your site’s health, performance, and longevity.

Security is the most immediate concern. PHP, like all software, has a finite support lifecycle managed by the PHP Foundation. When a version reaches end-of-life — typically after three years of active support followed by two years of security-only updates — it stops receiving vulnerability patches entirely. PHP 7.4 reached end-of-life in November 2022; PHP 8.0 followed in November 2023. Running either today means operating without security updates—equivalent to leaving your front door unlocked in a high-crime neighborhood. Attackers actively scan for servers running outdated PHP versions precisely because known vulnerabilities remain unpatched indefinitely. WordPress itself cannot protect you from PHP-level security flaws; that responsibility sits squarely with your server configuration.

Performance, though less urgent than security, directly impacts user experience and search rankings. Each major PHP release brings architectural improvements — often dramatic ones. PHP 8.0 introduced the JIT (Just-In-Time) compiler, which optimizes frequently executed code at runtime. Independent benchmarks from Kinsta and WP Engine show that moving from PHP 7.4 to 8.1 typically yields 30-50% performance improvements in standard WordPress workloads. That translates to faster page loads, lower bounce rates, and better Core Web Vitals scores. Of course, actual improvements depend on your specific site configuration, caching strategy, and plugin selection—but the trend is clear: newer PHP versions are measurably faster across the board.

Plugin and Theme Compatibility affects your ability to use modern WordPress extensions. As WordPress core adopts newer PHP language features, plugin authors follow suit. WordPress 6.5 requires PHP 7.4 minimum, but core development increasingly uses PHP 8.0+ features like constructor property promotion and match expressions. A plugin that uses typed properties (PHP 7.4), union types (PHP 8.0), or enums (PHP 8.1) simply won’t function on older versions. This creates software entropy: if you fall behind on PHP, you’ll gradually lose access to newer plugins and themes. Eventually, you’ll be unable to update your WordPress core or any modern extensions without a PHP upgrade. Though WordPress itself maintains backward compatibility within its supported PHP range, individual plugins and themes make their own decisions about which PHP features to use.

Strictly speaking, it’s not just about meeting minimum requirements; it’s about staying within a window of actively supported PHP versions. The WordPress core team tests against PHP versions still receiving security updates. Running an end-of-life PHP version means operating outside that tested envelope—a risk that compounds month by month as new vulnerabilities emerge without patches.

WordPress follows a predictable release cycle: major versions approximately twice per year, with WordPress 6.5 arriving in March 2024, preceded by 6.4 in March 2023, and so on. With each release, the core team balances adding new features, maintaining backward compatibility, and gradually pushing the ecosystem forward. The PHP version requirement sits at the intersection of all three competing priorities.

Before we examine that tension, though, let’s look at how WordPress actually manages PHP requirements. The minimum PHP version is declared in WordPress core’s main file via a version comparison check. If your server runs an older version, WordPress displays an error message and refuses to update. That safety check prevents catastrophic failure — but it also reveals a hard boundary: there exists a minimum version below which WordPress simply cannot function regardless of configuration.

So what happens when your PHP version is technically supported but approaching obsolescence? Here we encounter a subtler problem: gradual degradation. WordPress core maintains compatibility across a range of PHP versions, but as it adopts newer language features—like null coalescing operators (??), scalar type declarations, or the match expression—individual plugins and themes may also begin using those features. When we update WordPress, we often update plugins simultaneously. If any plugin contains syntax or function calls unsupported by our current PHP version, we encounter a fatal error. One may wonder: why doesn’t WordPress prevent this? The answer lies in scope: WordPress cannot inspect every plugin’s codebase during an update to determine compatibility. The version check applies only to WordPress core itself, not to the entire ecosystem of extensions.

Consider a concrete timeline. WordPress 5.6 (December 2020) raised the minimum requirement from PHP 5.6 to PHP 5.6.20. WordPress 6.1 (November 2022) increased the minimum to PHP 7.4. WordPress 6.5 (March 2024) still requires PHP 7.4 minimum, though development increasingly leverages PHP 8.0+ features. The trajectory is clear: each major release tightens the floor. Though we might update WordPress successfully today on PHP 7.4, we’re already at the edge of the current supported range. The next major release—likely WordPress 6.6 or 6.7—may very well require PHP 8.1 or higher. Of course, WordPress 6.5 isn’t the only version that matters; WordPress 6.5.4, a minor security release in April 2024, still targets the same PHP range but includes critical fixes that assume certain baseline behaviors.

One important nuance concerns minor releases. While they generally preserve backward compatibility, security patches sometimes include PHP-specific adjustments that expose latent incompatibilities in older PHP versions. So even a “small” update can reveal problems if your PHP version is too far behind. The practical consequence: when you see that WordPress update notification, the question isn’t simply “what new features does this add?” It’s also: “is my PHP version still within the actively supported range, and will my installed plugins survive the transition?” That second question often goes unasked until a site breaks. We can’t specify exactly which PHP version your particular site needs—that depends on your plugins and themes—but we can show you how to evaluate your environment and make an informed upgrade decision.

How to Check Your Current PHP Version

WordPress includes a built-in Site Health tool that provides accurate PHP version information directly from your server. Let’s walk through finding your PHP version methodically—and understand what the results mean for your site.

First, access your WordPress dashboard. You’ll need administrator privileges to view Site Health. Once logged in, navigate to Tools > Site Health in the left sidebar. You’ll see two tabs: Status and Info. Click the Info tab—this is where detailed environmental data lives.

Scroll down to the Server section and expand it by clicking the arrow icon. Inside, you’ll find:

  • The PHP version (e.g., “PHP 8.1.29” or “PHP 7.4.33”)
  • PHP extension availability (curl, mbstring, gd, etc.)
  • Configuration values: memory_limit, max_execution_time, upload_max_filesize

That PHP version line tells you your server-side version precisely. Take note of it—we’ll refer to this number throughout this guide.

What does WordPress tell you about this version? Site Health displays a status indicator next to your PHP version:

  • Green indicates WordPress considers this version “recommended” or acceptable
  • Yellow signals an older but still-functioning version
  • Red warns of an unsupported PHP version, with an explicit upgrade recommendation

These indicators reflect WordPress’s internal compatibility database, which tracks actively supported PHP versions. Of course, WordPress’s definition of “supported” aligns with PHP’s security support lifecycle—so a red indicator means you’re running a version that no longer receives security patches.

One may ask: can we trust Site Health? Absolutely. It reads the PHP version directly from the PHP_VERSION constant provided by PHP itself. The only nuance worth noting: on WordPress multisite installations, certain Site Health checks may be restricted depending on network administrator settings. In those cases—or if you simply want independent verification—you can create a temporary phpinfo.php file in your web root containing <?php phpinfo(); ?>, access it via browser, and delete it immediately afterward for security. But for the vast majority of users, Site Health is both convenient and accurate.

Tip: While you’re in Site Health, review the PHP extension status too. Missing extensions like curl (for API requests), mbstring (for multibyte text handling), or gd/imagick (for image processing) can break plugin functionality. This broader view helps you assess overall server health, not just PHP version compatibility. You might also notice memory_limit settings below recommended levels—256MB or higher is generally advisable for WordPress.

The Safe Way to Update Your PHP Version

Updating PHP is a server-level change—it affects every process running on your hosting account. Unlike plugin updates, which modify only WordPress files, changing PHP alters the fundamental runtime environment for your entire site. That makes methodical procedure essential. The backup-staging-test workflow isn’t merely caution; it’s the difference between a successful upgrade and catastrophic downtime.

We’ll walk through this process step by step, explaining not just what to do but why each step matters.

Step 1: Create a Full Backup

Before making any changes, create a complete backup that includes:

  • All WordPress core files (typically in /public_html, /www, or /htdocs)
  • The wp-content directory containing your themes, plugins, and uploaded media
  • The MySQL database (including all WordPress tables)

Use a reliable backup solution — UpdraftPlus, Duplicator, All-in-One WP Migration, or your host’s built-in backup feature. Most hosts provide automated nightly backups, but create a fresh backup immediately before making changes. That backup represents a known-good restore point you can return to within minutes if needed.

Important: Don’t just create the backup—verify it. Most backup plugins include a “test restore” or “download” feature. Confirm that:

  • The database export contains all your tables and data
  • The file archive isn’t corrupted and includes expected directories
  • You understand the restoration process before you need it

There’s nothing worse than discovering your backup is incomplete or corrupted when you’re already in a recovery situation. Test yours now, not later.

Step 2: Use a Staging Environment

A staging site is a private clone of your live website, typically accessible via a subdomain like staging.yoursite.com or through a password-protected directory. It’s where you test changes without affecting visitors or SEO rankings.

Most modern web hosts offer one-click staging: SiteGround, Kinsta, WP Engine, Flywheel, Bluehost, HostGator, and others include this feature. If your host doesn’t provide staging, you can create one manually:

  1. Create a subdomain (e.g., staging.yourdomain.com) or subdirectory
  2. Copy files via FTP, SFTP, or file manager
  3. Export your database via phpMyAdmin or WP-CLI and import it into a new database
  4. Update the siteurl and home options in the wp_options table to point to the staging URL
  5. Configure a separate wp-config.php with the new database credentials
  6. Optionally, add HTTP authentication for additional security

If manual staging feels daunting, many hosts will create a staging site for you upon request—sometimes as part of their managed services. The time invested in staging pays dividends: every issue caught there prevents a live-site emergency.

Once your staging site exists, verify it’s functional: log in, browse key pages, test forms, and confirm critical features work. Only then proceed to update PHP on staging and begin testing (covered in Step 4). Never test directly on live without staging first—the risk simply isn’t justified.

Step 3: Update PHP via Your Hosting Control Panel

This step varies by hosting provider, but the general pattern remains consistent. You’ll access your hosting account’s control panel—often cPanel, Plesk, or a custom dashboard—and locate the PHP version selector.

Common interfaces:

cPanel: Look for “MultiPHP Manager” or “PHP Selector” under the “Software” section. Select your domain from the list, then choose your desired PHP version from the dropdown. Many hosts also provide a “PHP Options” or “PHP Configuration” page where you can adjust memory_limit, max_execution_time, post_max_size, and other settings.

Plesk: Navigate to “Websites” > your domain > “PHP Settings.” You’ll find a version selector along with individual configuration directives you can modify.

Managed WordPress dashboards: Kinsta, WP Engine, Flywheel, and similar hosts typically have streamlined interfaces. Look for “PHP Version” under “Tools,” “Settings,” or “Sites” > your site > “Tools.” These often show available versions clearly and may recommend specific releases.

DirectAdmin, InterWorx, or custom panels: The PHP selector is usually under “Site Software” or similar categories. If you can’t locate it, your host’s documentation or support team can guide you.

When you open the version selector, you’ll typically see:

  • Latest stable release (e.g., 8.3.x or 8.2.x as of 2024)
  • Older but still-supported versions (8.1.x, 8.0.x)
  • Possibly end-of-life versions you should avoid (7.4.x, 7.3.x)

As of early 2024, we recommend PHP 8.1 or 8.2 for WordPress—both are actively supported and offer excellent performance. Avoid PHP 7.4 unless absolutely necessary (some legacy plugins may require it). Of course, be aware that PHP 7.4 reached end-of-life in November 2023 and receives no further security updates.

Configuration values matter too. While changing PHP versions, review these settings in the same interface:

  • memory_limit: WordPress recommends at least 256MB; many hosts default to 128MB or lower
  • max_execution_time: 60-300 seconds is typical; lower values can cause timeouts on complex operations
  • upload_max_filesize and post_max_size: Ensure these accommodate your media uploads; 64MB minimum, higher for large files
  • max_input_vars: Default may be 1000; complex forms or long menus may need 3000-5000

Most control panels let you set these alongside the version selector. If your site experiences timeouts after a PHP update, increasing max_execution_time and memory_limit often resolves the issue.

After selecting your PHP version (and optionally adjusting configuration), save changes. Your host will typically restart PHP-FPM or Apache’s PHP module within 2-5 minutes. Some hosts apply changes immediately; others require you to clear caches or restart services manually. Confirm the change via Site Health on your staging site—refer to the previous section for details.

One may wonder: what if my host doesn’t let me choose? Some shared hosting environments restrict PHP version selection or run outdated versions by default. In that case, contact your host’s support and request an upgrade to a currently supported PHP version. If they cannot or will not provide this, it’s a strong signal to consider alternative hosting. Running end-of-life PHP on a production WordPress site is an unacceptable security risk.

Step 4: Test Everything Thoroughly

Testing after a PHP update is not optional—it’s essential. Even if staging tests passed perfectly, repeat testing on live after the final backup. Caching layers, production-specific plugins, and live traffic patterns can reveal issues staging didn’t.

Start with the WordPress admin:

  • Can you log in and out without errors?
  • Do all admin menus load correctly?
  • Can you create and edit posts? Test the Gutenberg block editor specifically—some older plugins break under newer PHP versions
  • Can you upload media files?
  • Can you activate/deactivate themes and plugins?
  • Can you access Appearance > Customize, Menus, Widgets, etc.?
  • Do settings pages for your critical plugins load without errors?

Then test the front end systematically:

  • Home page, blog posts, archive pages, search results, 404 pages
  • Contact forms, checkout processes (for e-commerce), membership login areas
  • Interactive elements: dropdown menus, sliders, accordions, lightboxes
  • Search functionality and filtered results
  • Admin-ajax-driven features like “Load More” posts or infinite scroll
  • Responsive layouts on mobile viewports (use browser dev tools to simulate)

Check your browser’s developer console (F12 or right-click > Inspect):

  • JavaScript errors (red entries in Console tab)
  • 404s for missing CSS or JavaScript files (check Network tab)
  • PHP errors that might have been displayed (unlikely on good hosts, but possible)
  • CORS or mixed-content warnings

One important nuance: Production hosts typically disable display_errors for security. PHP errors go to logs, not the browser. If you encounter a white screen (the infamous White Screen of Death), that’s a fatal PHP error preventing any output. At that point, you’ll need to check error logs—covered in the troubleshooting section below.

Allocate at least 30 minutes for thorough testing on a typical site; complex sites with e-commerce, membership systems, or custom functionality may require 1-2 hours. Create a pre-flight checklist: list every critical page, form, and feature. Test each deliberately. Don’t rush—missed issues become emergencies later.

Tip: Enable debugging tools temporarily. Many plugins (WooCommerce, Advanced Custom Fields, etc.) include system status or debug modes that surface warnings. Also, consider installing Query Monitor, which reveals PHP errors, slow queries, and plugin conflicts in real-time. Just remember to disable debug modes after testing—they’re not meant for production.

When staging tests pass and live tests confirm all functionality, you’re done. If issues arise, consult the troubleshooting section that follows.

Troubleshooting Common Compatibility Issues

When PHP updates cause problems, symptoms typically fall into three categories. Recognizing which category you’re facing determines the solution path.

The White Screen of Death (WSOD)

The White Screen of Death—a completely blank page with no content—indicates a fatal PHP error that halted execution before any output reached the browser. This is the most dramatic failure mode.

What to do:

First, check your error logs. Locations vary by host:

  • cPanel: File Manager > logs/ section or “Errors”; also /usr/local/apache/logs/error_log
  • Standard Apache: /var/log/apache2/error.log or /var/log/httpd/error_log
  • Nginx with PHP-FPM: /var/log/nginx/error.log plus PHP-FPM logs (often /var/log/php-fpm.log or /var/log/php8.1-fpm.log)
  • Managed hosts: Usually in control panel or daily error reports; Kinsta shows logs under “Sites” > your site > “Logs”

If you lack log access, enable WordPress debugging in wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false); // Don't show errors to visitors

This directs errors to wp-content/debug.log. After reproducing the WSOD, check that log. You’ll see entries like:

[27-Mar-2024 14:32:11 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /home/user/public_html/wp-content/plugins/old-plugin/old-plugin.php:156
Stack trace:
#0 /home/user/public_html/wp-includes/plugin.php(224): old_plugin_function()
#1 {main}

The file path and line number pinpoint the source. Here, old-plugin.php line 156 calls mysql_connect(), which was removed in PHP 7.0. The plugin requires updating or replacement.

Plugin and Theme Errors

More common than WSOD are partial failures: the site loads, but specific features break. You might see missing admin buttons, broken shortcodes, JavaScript console errors, or forms that submit incorrectly.

The systematic approach is isolation:

  1. Switch to a default theme—Twenty Twenty-Four or Twenty Twenty-Three. If the problem disappears, your theme contains PHP 8.x incompatible code. Contact the theme developer or consider switching to an actively maintained alternative.

  2. Deactivate all plugins. If the issue vanishes, reactivate them one by one, testing after each activation. The plugin activated immediately before the problem returns contains the incompatible code. Of course, you can speed this up with WP-CLI if you have SSH:

    wp plugin deactivate --all
    # Then activate one by one with wp plugin activate plugin-slug
  3. Update or replace the identified plugin/theme. Often, the developer has already released a compatibility update. Check the plugin’s “Changelog” page on WordPress.org or the premium developer’s site. If no update exists and the plugin is essential, you have options:

    • Contact the developer directly, provide your error log, and ask about PHP 8.x compatibility plans
    • Find an alternative plugin with similar functionality that maintains current PHP support
    • In extreme cases, hire a PHP developer to patch the code (though this creates long-term maintenance obligations)

Deprecation Notices and Warnings

PHP 8.0+ introduced numerous deprecations—functions or syntax still functional but slated for removal. You might see messages like:

Deprecated: Function create_function() is deprecated in /wp-includes/pomo/translations.php on line 456

These don’t break your site, but they’re signals that code needs updating. Good hosts suppress deprecation notices in production; you typically see them only when WP_DEBUG is enabled. Still, address them promptly: update plugins/themes, replace abandoned software, or (if it’s WordPress core itself) report the issue to the core team.

Why deprecations matter: Functions marked deprecated today become removed errors tomorrow. If you ignore them now, you’ll face a WSOD when upgrading to a future PHP version. Treat deprecation warnings as early warnings—not optional technical debt.

Diagnostic Commands for Advanced Users

If you have SSH access, these commands expedite troubleshooting:

Check the WordPress debug log for recent errors:

grep -i "fatal\|error\|deprecated\|warning" wp-content/debug.log | tail -30

View PHP-FPM or web server error logs (paths vary by host):

tail -f /var/log/php8.1-fpm.log
tail -f /var/log/nginx/error.log

List plugins with outdated PHP requirements (WP-CLI):

wp plugin list --field=name | xargs -I % wp plugin get % --field=requires_php | sort -u

One may wonder: what if the problematic code isn’t in a plugin or theme, but in custom functionality? The same isolation approach applies: disable custom code systematically to identify the culprit. Custom code requires your team or contractor to update it for PHP 8.x compatibility.

The hard reality: Some abandoned plugins simply cannot be updated to work with modern PHP. If you depend on such software, you face a choice: find an alternative or remain on an older PHP version—which, as we’ve established, carries its own security and performance risks. There’s no universal answer; the right decision depends on your site’s specific requirements, your risk tolerance, and whether you can maintain legacy code internally.

Conclusion

We’ve covered substantial ground: why PHP compatibility matters, how to check your current version, how to update safely, and how to troubleshoot when things break. This topic, though often overlooked, connects to broader themes that extend beyond a single update cycle.

PHP compatibility is not a one-time task; it’s an ongoing practice. The WordPress core team’s roadmap clearly indicates that future releases will continue raising minimum PHP requirements. PHP 8.1, recommended today, will eventually become the baseline minimum—and the cycle continues. This progression isn’t arbitrary. It’s about leveraging improvements in the PHP language to make WordPress faster, more secure, and easier to develop for. Sticking with older PHP versions eventually means being unable to upgrade WordPress at all.

We should also acknowledge that hosting environments present different constraints. The backup-staging-test workflow we’ve outlined assumes you can control PHP version via a control panel. What if you’re on shared hosting with no version selector? Your path forward differs: you’ll need to contact your host and request an upgrade, possibly to a higher-tier plan that provides modern PHP versions. Some hosts proactively upgrade all customers; others lag for years. Knowing this dynamic helps you make informed hosting decisions. Of course, if you manage your own VPS or dedicated server, you have full control—but also full responsibility for security updates and maintenance.

The backup-staging-test workflow applies broadly to any site modification, not just PHP updates. It’s a discipline worth cultivating. Before updating any theme or plugin with wide-ranging effects—a page builder, e-commerce extension, or security plugin—staging is your safety net. Before migrating hosts or switching PHP configurations (like from mod_php to php-fpm), staging catches issues before real visitors encounter them. This isn’t paranoia; it’s professional practice.

One may wonder: what does the future hold? Looking ahead, several trends are clear. PHP continues improving: readonly properties, enums, and fiber-like async capabilities have arrived; JIT compilation improves steadily; type system enhancements accumulate. WordPress core gradually adopts these features as the minimum PHP requirement rises. Meanwhile, the plugin and theme ecosystem slowly sheds support for older PHP versions. The result: a moving target that rewards staying current.

Our advice, then, is straightforward:

  • Check your PHP version today using WordPress Site Health (Tools > Site Health > Info > Server)
  • If you’re on PHP 8.0 or higher, you’re positioned well for the next 12-18 months
  • If you’re on PHP 7.4, plan an upgrade this calendar year—it’s not urgent tomorrow, but it’s urgent soon
  • If you’re on PHP 7.3 or older, you’re already in unsupported territory; treat this as a critical project
  • If your host won’t provide a supported PHP version, consider migrating to one that will

For readers who want to dive deeper, explore these resources:

  • PHP’s official migration guides: 7.x → 8.0 and 8.0 → 8.1 document all breaking changes
  • Your critical plugins’ changelogs to see when they dropped support for older PHP versions
  • Advanced performance tuning with OPcache, which works best on PHP 8.0+

Finally, remember that technical maintenance—while sometimes tedious—is the foundation of site reliability. A well-maintained WordPress site runs faster, stays secure, and requires fewer emergency interventions. Take that backup, set up that staging site, and update with confidence. You’ve got this.

Sponsored by Durable Programming

Need help with your PHP application? Durable Programming specializes in maintaining, upgrading, and securing PHP applications.

Hire Durable Programming