For most actively maintained WordPress sites, the best PHP version is the newest supported version that WordPress, your theme, and your important plugins all work with. At the time of review, WordPress.org recommends PHP 8.3 or newer, alongside MariaDB 10.6+ or MySQL 8.0+ and HTTPS.
That does not mean every old site should be switched without testing. PHP upgrades can expose older plugin code, abandoned themes, custom snippets, and cron jobs that were quietly relying on older behaviour. The right answer is not just "use the latest version"; it is "use the latest version your site can run safely, then fix the reasons it cannot".
The Short Answer
If you are building a new WordPress site, start with PHP 8.3 or newer. If your host offers PHP 8.4 and your theme and plugins support it, that can also be a good target. For an existing site, test the upgrade on staging before changing production.
Avoid treating old PHP versions as normal. WordPress may still run on some older PHP versions, but old PHP releases eventually stop receiving security support from the PHP project. That matters for public websites, especially sites with logins, forms, ecommerce, membership areas, or custom code.
Why PHP Version Matters
WordPress is written in PHP. The PHP version affects the language features available to WordPress, plugin compatibility, memory use, error handling, and performance. A newer PHP version can make a site faster and safer, but only if the application code is compatible.
The risk is usually not WordPress core. The risk is the surrounding code: page builders, ecommerce plugins, security plugins, old themes, custom functions, abandoned shortcodes, payment integrations, and scheduled tasks.
Recommended Setup for a New WordPress Site
- PHP: use PHP 8.3 or newer where possible.
- Database: use modern MySQL or MariaDB versions supported by WordPress.
- HTTPS: use SSL from the start, not as a later extra.
- Extensions: keep common WordPress extensions available, including curl, mbstring, openssl, imagick or gd, zip, xml, and mysqli or pdo_mysql.
- Memory: give busy WooCommerce, membership, and builder-heavy sites more memory than a small brochure site.
How to Check Your Current PHP Version
In WordPress, go to Tools → Site Health → Info → Server. WordPress will show the PHP version, memory limit, server software, database version, and other useful environment details.
On TekLan hosting, you can also check from Enhance. Open the website, go to Advanced → Developer tools → PHP, and review the selected PHP version and enabled extensions.
How to Test a PHP Upgrade Safely
- Take a fresh file and database backup.
- Create a staging copy of the site if available.
- Update WordPress core, plugins, and the active theme first.
- Switch staging to the target PHP version.
- Test the homepage, key landing pages, admin dashboard, forms, search, checkout, login, and scheduled tasks.
- Check the PHP error log and WordPress debug log for warnings or fatal errors.
- Repeat the change on the live site during a quiet period.
Common Signs a Site Is Not Ready
- A white screen or fatal error after switching PHP.
- Plugins disappearing, deactivating, or showing compatibility warnings.
- Forms stop sending or checkout fails.
- Admin pages work but cron jobs fail because they use a different PHP binary.
- Old custom code uses removed PHP functions.
What About WooCommerce?
WooCommerce stores deserve extra caution because checkout, payment callbacks, product imports, subscriptions, stock management, and emails all depend on background tasks. Test a real order workflow on staging after changing PHP. Do not judge compatibility from the homepage alone.
What If a Plugin Blocks the Upgrade?
First, check whether there is an update. If the plugin is abandoned, look for a maintained replacement. If it is custom code, ask a developer to make it compatible with a supported PHP version. Holding an entire site on old PHP because of one plugin is a short-term workaround, not a long-term plan.
TekLan Hosting Notes
TekLan web hosting and application hosting use Enhance, so each website can run its own PHP version. That is useful when one older WordPress site needs more time while newer sites can move ahead.
For the control panel steps, see Changing Your PHP Version in Enhance. If a site is being moved as part of the upgrade, read How to Move a WordPress Site to TekLan Hosting as well.