Software
Which PHP Version Should You Use in 2026? A Practical Guide for Laravel and WordPress
PHP 8.6 is out, 8.2 is about to lose support, and hosts don't all offer the newest release. Here's how to pick without breaking your site.
Choosing a PHP version used to mean "whatever the host set". Now the gap between releases matters: older versions stop getting security fixes, and newer ones need your framework and plugins to keep up. Here's how to decide.
PHP support dates at a glance
Each PHP version gets about two years of active support (bug and security fixes), then two years of security fixes only.
| Version | Security support ends |
|---|---|
| PHP 8.1 | Already ended |
| PHP 8.2 | 31 December 2026 |
| PHP 8.3 | 31 December 2027 |
| PHP 8.4 | 31 December 2028 |
| PHP 8.5 | 31 December 2029 |
| PHP 8.6 | 31 December 2030 |
The key point: running an old major version is fine only while it still gets patches. Once it doesn't, every new flaw stays open. The recent PHP security updates show why this matters.
What's new in PHP 8.6
PHP 8.6.0 was released on 19 November 2026. Highlights include:
Partial function application, which lets you fix some arguments of a function and get back a new callable.
A
clamp()function to keep a number within a minimum and maximum.A
\Time\Durationclass for working with time spans.Default values for readonly properties.
A
SortDirectionenum and a new polling API.
None of these are urgent for an existing site. They're good reasons to start new projects on 8.6 once your host supports it.
Laravel: what each version supports
| Laravel version | Supported PHP versions |
|---|---|
| Laravel 12 | 8.2 to 8.5 |
| Laravel 13 | 8.3 to 8.5, plus 8.6 from v13.44 |
So a Laravel 12 app can't officially run on PHP 8.6. If you want 8.6, upgrade to Laravel 13 first. Laravel 12's security support ends on 24 February 2027, so planning that upgrade in early 2027 makes sense anyway.
For a Laravel 12 app today, PHP 8.3, 8.4 or 8.5 are all reasonable. Newer gives you a longer support window, and 8.3 is a safe, conservative pick if your packages haven't caught up yet.
WordPress: check plugins, not just core
WordPress core usually supports new PHP releases quickly, but plugins and themes are the real constraint. An abandoned plugin can throw errors on a newer PHP version.
Before upgrading:
Update WordPress core, plugins and themes.
Check each plugin's page for "tested up to" information and recent updates.
Remove plugins that haven't been updated in a long time.
Test on a staging copy if your host offers one.
Shared hosting limits your options
You can only choose versions your host offers. For example, Hostinger's shared plans currently offer PHP 8.2 to 8.5, so PHP 8.6 isn't an option there yet.
On many shared plans, the PHP version setting applies to every website in the plan, not just one. If you host several sites together, make sure all of them are ready before switching.
How to upgrade without downtime
Check compatibility. Confirm your framework, packages and plugins support the target version. For Composer projects, update
require.phpincomposer.jsonand runcomposer update --dry-runlocally to spot conflicts.Test locally or on staging. Run your test suite and click through key pages under the new version.
Pick a quiet time. Switching PHP on hosting usually takes effect in seconds, but schedule it when traffic is low.
Switch and watch logs. Change the version in your hosting panel, then check the error log and key pages immediately.
Have a rollback ready. If something breaks, switch back in the panel, which is equally quick, then fix the issue on staging.
The short answer
New project: the newest version your host and framework support. 8.5 today, 8.6 once supported.
Existing Laravel 12 app: 8.3 to 8.5. Plan Laravel 13 for early 2027.
WordPress site: 8.3 or newer, after checking plugins.
On 8.2 or older: upgrade before 31 December 2026.
Related reading: PHP security updates: what site owners should do · Dev and production parity: database lessons
Frequently asked questions
Which PHP version is best for Laravel 12?
PHP 8.3, 8.4 or 8.5. Laravel 12 supports 8.2 to 8.5, but 8.2 loses security support at the end of 2026.
When does PHP 8.2 support end?
Security support for PHP 8.2 ends on 31 December 2026.
Can I use PHP 8.6 with Laravel?
Yes, with Laravel 13 from version 13.44. Laravel 12 doesn't officially support PHP 8.6.
Is it safe to switch PHP versions on shared hosting?
Usually, if you've checked compatibility first. The switch is quick and reversible from your hosting panel, but it may apply to every site on the plan.
Sources: PHP supported versions page and PHP 8.6 release announcement (19 November 2026); Laravel support policy and upgrade documentation; Hostinger PHP version documentation. Support dates are as published on 30 November 2026.
Further reading: PHP: supported versions · Laravel: support policy
Related
Software
PHP Security Updates: Critical Flaws Fixed, What Site Owners Should Do Now
PHP released critical security fixes in October and again in November 2026. If your site runs on PHP, here's how to check whether you're patched, whic...
Software
Windows 10 ESU Now Runs to October 2027: How to Check Your PC Is Enrolled
Windows 10 Extended Security Updates for home users now last until 12 October 2027. But only enrolled PCs get them. Here's how to check, how to enroll...
Software
Laravel Queues and Cron on Shared Hosting: What Actually Works
Shared hosting can run Laravel queues and the scheduler reliably, but only if you design around its limits. Here's the setup that works, and the traps...
The stream
All storiesPHP Security Updates: Critical Flaws Fixed, What Site Owners Should Do Now
PHP released critical security fixes in October and again in November 2026. If your site runs on PHP, here's how to check whether you're patched, which versions to look for, and what to do if you're o...
Gemini AI Training Opt-Out: Stop Training on Your Chats Without Losing History
Gemini used to make you choose between saving your chats and keeping them out of AI training. A new update separates the two. Here's what changed, what the defaults are, and how to set it up.
Upcoming Phones in India: December 2026 Launches to Wait For
Xiaomi 18 Pro, iQOO 16 and OnePlus 16R are the big flagships expected in India around December 2026, with Vivo X500 and Motorola Signature 27 already out. Here's what's confirmed so far.
Windows 10 ESU Now Runs to October 2027: How to Check Your PC Is Enrolled
Windows 10 Extended Security Updates for home users now last until 12 October 2027. But only enrolled PCs get them. Here's how to check, how to enroll for free, and when to plan your move.
GTA 6 PC Release Date: Everything Rockstar and Take-Two Have Actually Said
There is no official GTA 6 PC release date. Take-Two says any PC news will come from Rockstar. Based on GTA 5 and Red Dead Redemption 2, the realistic window is late 2027 to 2028.