PHP Version Management

Hosting Fundamentals

PHP Version Management in Hosting: Why It Matters

The one server setting most site owners never check — until something breaks

📖 ~4,500 words ⚙️ Practical & Technical ⚡ Updated 2026

Your hosting account is running a specific version of PHP right now. There is a very good chance you’ve never checked what it is. And there’s a reasonable chance it’s older than it should be — potentially years out of date, no longer receiving security patches, and measurably slowing your site down.

PHP is the programming language that powers the server-side logic of roughly 75% of all websites — including WordPress, Drupal, Joomla, Magento, and countless custom web applications. The version your host runs has a direct impact on your site’s speed, security, and compatibility with modern plugins and themes.

This guide explains everything you need to know about PHP version management in a hosting environment: what the version numbers mean, why they matter more than most people realise, how to check what you’re running, and how to upgrade safely without breaking your site.

1. What PHP Is and Why It Runs Your Site

PHP (Hypertext Preprocessor) is a server-side scripting language — meaning it runs on your web server, not in your visitor’s browser. When someone visits a WordPress page, PHP is what processes the request: it queries the database, retrieves the right content, applies the theme, assembles the HTML, and sends the final page to the browser. The visitor never sees PHP — they only see its output.

PHP’s dominance is extraordinary. According to W3Techs, approximately 77% of all websites whose server-side language is known use PHP. This includes WordPress (which alone runs over 40% of all websites), as well as major platforms like Facebook (historically), Wikipedia, and Slack. It’s the lingua franca of web hosting because it’s open-source, widely supported, and deeply integrated into the shared hosting ecosystem.

⚙️
PHP Is Not JavaScript

A common source of confusion: PHP runs on the server; JavaScript runs in the browser. When your WordPress site loads, PHP executes on your hosting server to build the page, then sends plain HTML to the visitor. JavaScript then handles interactive elements in the browser. Both matter, but PHP version management is a server configuration issue — something you control through your hosting account, not your website code.

Where PHP Lives in Your Hosting Stack

Your hosting server runs a software stack — typically a combination of a web server (Apache or Nginx), a PHP interpreter, and a database (MySQL or MariaDB). The PHP interpreter is what actually executes your PHP files. Your hosting provider installs and maintains this interpreter, and they typically support multiple PHP versions simultaneously, letting you choose which one your account uses.

This is the key point: PHP version selection is a hosting account setting, not something baked into your website files. Changing PHP version doesn’t change your site’s code — it changes which PHP engine interprets that code. That’s why you can switch versions through your hosting control panel without uploading anything new to your site.

2. PHP Version Numbers Explained

PHP uses a three-part version numbering system: Major.Minor.Patch. Understanding this scheme tells you a lot about the significance of any given update.

ComponentExampleWhat It SignalsBackwards Compatible?
MajorPHP 8.x.xFundamental language changes — new syntax, dropped featuresNot guaranteed — breaking changes possible
MinorPHP 8.3.xNew features and improvements within the same major versionGenerally yes, occasional deprecations
PatchPHP 8.3.6Bug fixes and security patches onlyYes — safe to apply immediately

What “End of Life” Means

Every PHP version has a defined support lifecycle managed by the PHP project. Each minor version receives:

  • Active support — bug fixes and security patches, typically for 2 years after release
  • Security support only — security fixes only, for an additional 1 year
  • End of Life (EOL) — no further updates of any kind released. Running an EOL version means known security vulnerabilities will never be patched.

The PHP project publishes this schedule publicly at php.net/supported-versions.php. It’s worth bookmarking — checking it once a year takes 30 seconds and tells you whether your current version is still receiving patches.

⚠️
EOL Does Not Mean Immediately Broken

When a PHP version reaches End of Life, your site doesn’t stop working. Everything keeps running exactly as before. What changes is that newly discovered security vulnerabilities in that PHP version will never receive a patch — leaving your site permanently exposed to exploits as they become known. The risk accumulates silently over time. Many sites run on EOL PHP for years without visible problems, right up until they’re compromised.

3. PHP Version Timeline: What’s Active in 2026

Here’s the current state of PHP versions and their support status as of 2026.

PHP Version Support Status — 2026

PHP 7.4
End of Life — Nov 2022
⛔ EOL
PHP 8.0
End of Life — Nov 2023
⛔ EOL
PHP 8.1
End of Life — Dec 2024
⛔ EOL
PHP 8.2
Security support until Dec 2026
✓ Security
PHP 8.3
Active support until Dec 2026 — Security until Dec 2027
🟢 Active
PHP 8.4
Active to Dec 2027 · Security to Dec 2028
🟢 Active
End of Life — no patches Security support only Active support (bugs + security)
🎯
The Recommended Version in 2026

For most WordPress sites and standard web applications in 2026, PHP 8.3 is the recommended target — it’s on active support, has broad plugin compatibility, and delivers substantial performance gains over PHP 7.x and 8.0/8.1. PHP 8.4 (released November 2024) is stable and suitable for sites whose plugins and themes have confirmed compatibility. When in doubt, 8.3 is the safe, high-performance choice.

4. Why Your PHP Version Matters

PHP version affects four critical dimensions of your website. None of them are abstract — they have direct, measurable impact on your site’s performance, security posture, and long-term maintainability.

🔒 Security

EOL PHP versions receive zero security patches. Every vulnerability discovered after the EOL date remains permanently unpatched on your server. Attackers actively scan for and exploit known PHP vulnerabilities — an EOL version is a known, static target.

Performance

Each PHP version brings measurable speed improvements. PHP 8.x is dramatically faster than PHP 7.x thanks to the JIT (Just-In-Time) compiler introduced in PHP 8.0. Running a modern PHP version is one of the highest-ROI performance improvements available with zero code changes.

🔌 Plugin & Theme Compatibility

WordPress plugins and themes increasingly declare minimum PHP version requirements. Running an old PHP version can block you from installing updates to critical plugins — or worse, cause your site to break when a plugin auto-updates and finds an incompatible environment.

🛠️ New Language Features

Modern PHP versions introduce language features (named arguments, enums, fibers, property hooks) that developers use in new code. Staying current means you have access to the full capabilities of your stack and aren’t blocked from using modern libraries.

5. The Real Risks of Running Old PHP

Let’s be concrete about what “old PHP” actually costs you. These aren’t theoretical risks — they’re documented, regularly exploited attack vectors.

Known Vulnerabilities with No Patch Coming

PHP vulnerabilities are catalogued in the CVE (Common Vulnerabilities and Exposures) database and disclosed publicly. When a version reaches EOL, the PHP project stops backporting security fixes to it. Security researchers keep finding vulnerabilities; attackers keep developing exploits; your server stays permanently exposed.

PHP 7.4 — which reached EOL in November 2022 — has dozens of known CVEs with no patch available. Any server still running PHP 7.4 is vulnerable to every one of them, permanently. Shared hosting environments that still offer PHP 7.4 are doing their customers a disservice by making it selectable.

Plugin Update Blockers

The WordPress ecosystem has been steadily raising its PHP floor. WooCommerce requires PHP 7.4+ and strongly recommends 8.0+. The Yoast SEO plugin, Elementor, and dozens of other widely used plugins have minimum PHP requirements that are moving upward with each major release. Running old PHP increasingly means running old plugins — which means missing security fixes in those plugins too. It compounds.

Hosting Provider Forced Migrations

Many hosting providers are retiring very old PHP versions — some have already removed PHP 7.x from their available options. If your host retires a PHP version you’re running, they will either automatically migrate you to a newer version (which may break an unprepared site) or restrict certain functionality until you upgrade. Proactive version management on your own schedule is far better than a forced migration during business hours.

Performance Costs That Add Up Daily

Running PHP 7.4 instead of PHP 8.3 means every page request takes measurably longer. On a high-traffic site, the cumulative cost in server resources and visitor wait time is substantial. Performance is not just a user experience issue — it’s a search ranking factor, a conversion factor, and an infrastructure cost factor.

⚠️
Check Your Hosting Account Today

Log into your hosting control panel right now and find the PHP version setting (usually in cPanel under “MultiPHP Manager” or “PHP Selector”). If you’re running PHP 8.1 or older, you are on an EOL or soon-to-be-EOL version. This guide will walk you through checking compatibility and upgrading safely.

6. Performance Gains by Version

The performance improvements across PHP versions are among the most significant in the language’s history. The jump from PHP 5.x to PHP 7.0 roughly doubled execution speed. PHP 8.0 introduced a JIT (Just-In-Time) compiler that further accelerated compute-heavy workloads.

PHP VersionKey Performance FeatureWordPress Req/Sec (relative)vs PHP 7.4
PHP 7.4Preloading, typed propertiesBaseline
PHP 8.0JIT compiler, union types, match expressions~+10–15%+10–15%
PHP 8.1Fibers, enums, readonly properties~+20–25%+20–25%
PHP 8.2Readonly classes, true/false/null types~+25–30%+25–30%
PHP 8.3Typed class constants, json_validate(), deep cloning~+30–35%+30–35%
PHP 8.4Property hooks, asymmetric visibility, lazy objects~+33–38%+33–38%

These figures are indicative benchmarks for WordPress workloads — actual gains vary by application. The key takeaway is that upgrading from PHP 7.4 to PHP 8.3 typically delivers a 30–35% improvement in raw PHP execution throughput with zero changes to your application code. Few other optimisations deliver that return for that little effort.

💡
JIT Compiler: What It Actually Does

The JIT (Just-In-Time) compiler, introduced in PHP 8.0, compiles frequently executed PHP code into native machine code at runtime rather than interpreting it afresh each time. This dramatically speeds up compute-intensive operations. For typical WordPress sites, the JIT benefit is moderate (most bottlenecks are I/O and database, not CPU). For compute-heavy PHP applications — image processing, mathematical calculations, data transformation — JIT can deliver much larger gains.

7. PHP & WordPress Compatibility

WordPress has its own PHP version requirements and recommendations that are separate from — but closely tied to — the PHP project’s own lifecycle. Understanding both is essential before upgrading.

WordPress’s Official PHP Requirements

WordPress publishes its PHP requirements in its official documentation and in the dashboard health check. As of 2026:

  • Minimum PHP version: 7.4 (WordPress will technically run, but warns you)
  • Recommended PHP version: 8.1 or higher
  • Optimal for 2026: PHP 8.3 — the best balance of compatibility and performance
🔍
WordPress Site Health Tool

WordPress includes a built-in Site Health tool at Tools → Site Health in your dashboard. It checks your PHP version against WordPress’s current recommendations and flags it as a critical issue if you’re running something outdated. This is the fastest way to get a PHP health check without logging into your hosting control panel. Check it monthly.

Plugin and Theme Compatibility

This is where PHP version management gets genuinely complicated. WordPress plugins declare their minimum PHP requirements in their plugin headers, and the WordPress plugin repository will warn you before installing a plugin that requires a newer PHP version than you’re running. But the reverse situation — a plugin update that raises its minimum PHP version above what you’re running — can silently break your site if auto-updates are enabled.

Before upgrading PHP, you need to verify that your installed plugins and themes support the target version. The most reliable way to do this:

  1. Check each plugin’s “Tested up to” and “Requires PHP” fields on wordpress.org/plugins
  2. Use the PHP Compatibility Checker plugin (by WP Engine) to scan your codebase for deprecated functions and compatibility issues
  3. Test on a staging environment before changing PHP in production

The Most Common PHP Upgrade Breaking Points

Upgrade PathCommon IssuesRisk Level
7.4 → 8.0Removed functions, stricter type handling, deprecated dynamic property creationMedium-High — test carefully
8.0 → 8.1Deprecation warnings for some patterns, intersection types stricterLow-Medium — usually smooth
8.1 → 8.2Dynamic properties deprecated (triggers notices), some PDO changesLow — usually smooth
8.2 → 8.3Minimal breaking changes — largely backwards compatibleVery Low — safe upgrade
8.3 → 8.4Some deprecations around implicit nullable typesLow — check plugin compatibility

8. How to Check Your Current PHP Version

There are several ways to check what PHP version your hosting account is running. Use whichever matches your access level.

Method 1: WordPress Dashboard (Easiest)

In WordPress, go to Tools → Site Health → Info tab. Expand the “Server” section — your PHP version is listed there. The Status tab will also flag any PHP-related issues as Critical or Recommended improvements.

Method 2: Hosting Control Panel

Log into your hosting account’s control panel (cPanel, Plesk, or your host’s custom dashboard). Look for:

  • cPanel: “MultiPHP Manager” or “Select PHP Version” under the Software section
  • Plesk: Domains → your domain → PHP Settings
  • Custom dashboards: Usually under Website, Advanced, or Server settings

Method 3: Create a phpinfo() File

Create a file called phpinfo.php in your site’s root directory with this single line:

<?php phpinfo(); ?>

Visit yourdomain.com/phpinfo.php in your browser. The page displays detailed information about your PHP installation including the exact version, loaded extensions, and configuration values. Delete this file immediately after checking — it exposes sensitive server information and should never remain publicly accessible.

Method 4: WP-CLI (For Developers)

If you have SSH access and WP-CLI installed, run:

php --version

This shows the PHP version the command line is using. Note that the CLI PHP version may differ from the web server PHP version on some hosts — your hosting control panel is the authoritative source for what’s serving your website.

9. How to Change Your PHP Version

Changing PHP version is done through your hosting control panel — no file uploads, no code changes. The exact path varies by provider, but the process is consistently straightforward. Here’s how it works on the most common platforms.

cPanel (MultiPHP Manager)
  1. Log in to cPanel
  2. Go to Software → MultiPHP Manager
  3. Check the box next to your domain
  4. Select target PHP version from dropdown
  5. Click Apply
  6. Change takes effect immediately
Plesk
  1. Log in to Plesk
  2. Go to Websites & Domains
  3. Click your domain
  4. Select PHP Settings
  5. Choose PHP version from dropdown
  6. Click OK to save
SiteGround
  1. Log in to Site Tools
  2. Go to Devs → PHP Manager
  3. Select your domain
  4. Choose PHP version
  5. Click Confirm
  6. Wait 1–2 minutes to propagate
Kinsta / WP Engine
  1. Log in to MyKinsta or WP Engine dashboard
  2. Select your site / environment
  3. Go to Settings → PHP Engine (Kinsta) or PHP version (WP Engine)
  4. Select target version
  5. Confirm the change
  6. Change applies within minutes
💡
Using .htaccess to Override PHP Version

On some shared hosting environments, you can set PHP version per-directory using a .htaccess directive like AddHandler application/x-httpd-php83 .php. This is useful when you need different PHP versions for different applications on the same account. However, the exact handler name varies by host — check your host’s documentation or ask support for the correct syntax before relying on this method.

10. How to Upgrade PHP Safely

Changing PHP version on a live production site without preparation is the fastest way to break it. Follow this process and you’ll never have an unpleasant surprise.

Step 1: Create a Full Backup

Before touching anything, create a complete backup of your website files and database. This is your rollback plan. If something breaks after the PHP upgrade, you can restore and try again. Most good hosts have one-click backup tools; for WordPress, UpdraftPlus is reliable. Store the backup somewhere off-server.

Step 2: Run a Compatibility Check

Install the PHP Compatibility Checker plugin (search the WordPress plugin repository). Run it with your target PHP version selected. It will scan your themes, plugins, and custom code for deprecated functions and known incompatibilities. Note every issue it finds — some will be false positives, but any genuine issues need to be resolved before upgrading.

Step 3: Update Everything First

Update WordPress core, all plugins, and all themes to their latest versions before changing PHP. Newer plugin versions are more likely to be compatible with modern PHP. An outdated plugin on new PHP is a common source of post-upgrade breakage.

Step 4: Test on a Staging Environment

If your host provides staging environments (Kinsta, WP Engine, SiteGround, and others do), clone your live site to staging, change the PHP version there first, and thoroughly test your site. Click through every page, test all forms and checkout flows, log in and out, check the admin dashboard. Only proceed to production once staging is verified clean.

If no staging environment is available, consider doing the upgrade during your lowest traffic window (typically late night on a weekday) so any issues affect the fewest visitors.

Step 5: Change PHP Version in Production

Using the steps in Section 9, change your PHP version. The change typically takes effect within seconds to a few minutes.

Step 6: Immediately Verify

As soon as you’ve changed the version, open your site’s frontend and admin dashboard in a fresh browser tab (or incognito window to avoid cached content). Check that pages load, the admin dashboard is accessible, and no PHP error messages are visible. If something is broken, roll back to the previous PHP version immediately through the same control panel — it’s reversible in seconds.

Step 7: Monitor Error Logs for 24–48 Hours

Even if the site looks fine on surface inspection, PHP errors may be occurring on less-visited pages or in background processes. Check your PHP error log in cPanel (Metrics → Errors, or via the File Manager at public_html/wp-content/debug.log if WP_DEBUG is enabled) for the first 48 hours after upgrading.

Rolling Back Is Instant

If you upgrade PHP and something breaks, you can revert to your previous version in your hosting control panel in under 60 seconds. PHP version changes are completely non-destructive — switching back immediately restores your site to exactly how it was before. There is no data loss risk. This makes PHP upgrades far less scary than they might appear: if anything goes wrong, the rollback is faster than reporting the issue to a developer.

11. PHP Extensions & Configuration

PHP version is the headline setting, but two other configuration areas deserve attention when managing PHP in a hosting environment: extensions and php.ini directives.

PHP Extensions

PHP extensions are modules that add specific functionality to the PHP core — database drivers, image processing, encryption, caching, and more. WordPress and its ecosystem require a specific set of extensions to function correctly. Most hosting providers install the most common ones by default, but knowing what’s required helps you diagnose problems.

Extensions WordPress requires or strongly recommends:

  • curl — HTTP requests to external services (payment gateways, APIs, plugin updates)
  • dom — XML and HTML document parsing
  • exif — Image metadata reading (used in media library)
  • fileinfo — File type detection for uploads
  • hash — Password hashing and data integrity
  • imagick or GD — Image processing (resizing, cropping thumbnails)
  • mbstring — Multi-byte string handling for international character sets
  • mysqli or mysqlnd — MySQL database connection
  • openssl — SSL/TLS encryption for HTTPS connections
  • zip — Archive handling for plugin and theme installs
  • opcache — PHP bytecode caching — significantly speeds up every request

Key php.ini Directives

The php.ini file controls PHP’s runtime behaviour. Many hosting providers allow you to override common settings via cPanel’s “PHP Editor” or through a php.ini or .user.ini file in your site root.

DirectiveWhat It ControlsRecommended Value
memory_limitMaximum RAM a PHP script can consume256M (512M for WooCommerce)
max_execution_timeMaximum seconds a script can run before timing out60–120 seconds
upload_max_filesizeMaximum file size for uploads64M–128M for most sites
post_max_sizeMaximum size of POST request data (must be ≥ upload_max_filesize)64M–128M
max_input_varsMaximum number of input variables per request3000–5000 (WooCommerce can need more)
opcache.enablePHP bytecode caching — dramatically speeds up execution1 (enabled)
display_errorsWhether PHP errors are shown to site visitorsOff (production) / On (development only)
⚠️
Never Enable display_errors in Production

With display_errors = On, PHP error messages are shown directly on your website to all visitors. These messages can expose file paths, database credentials, and internal application structure — a significant security risk. Keep it off in production. Use a debug log file instead: set log_errors = On and error_log = /path/to/php_errors.log to capture errors privately.

12. PHP Version Checklist

Use this checklist to audit your current PHP setup and keep it healthy going forward.

Immediate Actions

  • Check your current PHP version via WordPress Site Health (Tools → Site Health → Info → Server) or your hosting control panel
  • Compare your version against the PHP lifecycle page at php.net/supported-versions.php — is it still receiving security patches?
  • If running PHP 8.1 or older, plan an upgrade to PHP 8.3 this month
  • Check your WordPress Site Health Status tab for any PHP-related critical issues
  • Verify OPcache is enabled — check via Site Health or phpinfo()

Before Upgrading PHP

  • Create a full backup of files and database before making any changes
  • Update WordPress core, all plugins, and all themes to latest versions
  • Run PHP Compatibility Checker plugin against your target PHP version
  • Test the upgrade on a staging environment if your host provides one
  • Identify the rollback path — confirm you can revert PHP version instantly in your control panel
  • Schedule the upgrade during your lowest-traffic window

After Upgrading PHP

  • Immediately verify your site’s frontend and admin dashboard load correctly
  • Test all forms, checkout flows, login/logout, and key interactive elements
  • Check your PHP error log for the first 48 hours after upgrading
  • Verify WordPress Site Health no longer flags a PHP version issue
  • Set a calendar reminder to check your PHP version again in 12 months

One Setting,
Four Dimensions of Impact

PHP version management doesn’t get discussed often enough. It’s unglamorous — buried in a hosting control panel, invisible to visitors, never mentioned in marketing copy. But it touches security, performance, compatibility, and long-term maintainability simultaneously. Few other single settings have that range of impact.

The good news is that getting it right is not difficult. Check your version. Compare it against the PHP lifecycle. If you’re on something EOL or approaching EOL, back up, run the compatibility checker, test on staging if you can, and upgrade. The rollback is instant if anything goes wrong. The performance gain is immediate when it goes right.

Most sites that get hacked through PHP vulnerabilities weren’t running exotic, specialised software — they were running an old PHP version their owner forgot to update years ago. Don’t be that site.

Check your PHP version today.
Set a reminder to check again in 12 months.