Skip to content

Update WordPress PHP version: safe and hassle-free

Last updated: 31 December 2025

# Update WordPress PHP version: safe and hassle-free Your WordPress website runs on PHP, the programming language behind WordPress. Just like your smartphone regularly gets updates, PHP is continuously improved. An outdated PHP version can make your website slower, more vulnerable to hackers, and incompatible with new WordPress features. In this article you'll learn why updating your PHP version is important, how to check which version you're currently using, and how to safely update step-by-step with different hosting providers. ## Why update your PHP version? **Speed and performance** Each new PHP version is faster than its predecessor. PHP 8.3, for example, is up to 2x faster than PHP 7.4. This means your website loads pages faster, which not only makes visitors happy but also improves your Google ranking. **Security** Old PHP versions no longer receive security updates. PHP 7.4 and older are "end of life" and no longer supported. This makes your website vulnerable to attacks. Hackers actively scan for websites with outdated PHP versions. **New features** Modern WordPress plugins and themes use new PHP functionality. With an old PHP version you'll get error messages or certain features won't work. Some plugins even refuse to install on outdated PHP versions. **Hosting support** Many hosting providers are phasing out old PHP versions. If your hosting provider stops supporting PHP 7.4, your website could go offline if you don't update in time. ## Which PHP version do you currently have? Before you start updating, you need to know which PHP version you're currently using. There are three ways to check this: **Via WordPress dashboard** Go to Site Health (Tools > Site Health). Under the "Info" tab you'll see under "Server" which PHP version is active. **Via hosting control panel** Log in to your hosting provider. In cPanel, DirectAdmin or the custom dashboard you usually see directly which PHP version is active for your domain. **Via a PHP file** Create a file `info.php` with this code: ```php ``` Upload this to your WordPress root directory and visit `yoursite.com/info.php`. You'll now see all PHP information. Delete this file immediately afterwards (contains sensitive server information). ## Check compatibility before updating Not all WordPress sites can simply switch to the latest PHP version. Old plugins or themes may be incompatible. Follow these steps: **1. Check WordPress minimum version** - PHP 8.0+: WordPress 5.6 or newer - PHP 8.1+: WordPress 5.9 or newer - PHP 8.2+: WordPress 6.1 or newer - PHP 8.3+: WordPress 6.3 or newer **2. Check your plugins and themes** Go to the WordPress.org page of each of your plugins and themes. Look at "Tested up to" and "Requires PHP". If a plugin hasn't been tested with PHP 8.0+ and hasn't been updated in years, find an alternative. **3. Use PHP Compatibility Checker plugin** Install the free "PHP Compatibility Checker" plugin. This scans your entire website and shows which files might cause problems with a new PHP version. **4. Test on a staging environment** Make a copy of your website (staging environment) and test the new PHP version there first. Many hosting providers offer staging functionality. Click through your entire website, test forms, checkout process, etc. ## Update PHP version with different hosts ### General cPanel hosting Most hosting providers use cPanel. The process is similar everywhere: 1. Log in to cPanel 2. Find "Select PHP Version" or "MultiPHP Manager" 3. Select your domain 4. Choose the desired PHP version from the dropdown 5. Click "Apply" The change is usually active within minutes. Most cPanel hosts support PHP 7.4 through 8.3. ### Plesk hosting For Plesk-based hosting: 1. Log in to Plesk 2. Go to "Websites & Domains" 3. Click on your domain 4. Find "PHP Settings" 5. Select the new PHP version 6. Click "OK" or "Apply" Note: Plesk activates the new version immediately without warning. So test on staging first. ### Custom hosting panels Many providers have their own control panels: 1. Log in to your hosting account 2. Look for "PHP Settings", "PHP Version" or similar 3. Select your website/domain 4. Choose the desired PHP version 5. Save/Apply the changes The exact steps vary by provider, but the principle is the same everywhere. ### VPS or dedicated server If you have a VPS or dedicated server, you update PHP via the command line: **Ubuntu/Debian:** ```bash # Install new PHP version sudo apt update sudo apt install php8.3 php8.3-fpm php8.3-mysql php8.3-xml php8.3-curl # Update Apache or Nginx config to use new version # For Apache with mod_php: sudo a2dismod php7.4 sudo a2enmod php8.3 sudo systemctl restart apache2 # For Nginx with PHP-FPM, adjust the socket in your site config: # fastcgi_pass unix:/run/php/php8.3-fpm.sock; ``` **CentOS/AlmaLinux:** ```bash # Add Remi repository sudo dnf install epel-release sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm # Install PHP 8.3 sudo dnf module reset php sudo dnf module enable php:remi-8.3 sudo dnf install php php-fpm php-mysqlnd php-xml # Restart webserver sudo systemctl restart httpd ``` Don't forget to also check your `php.ini` settings and transfer them to the new PHP version if necessary. ## Common problems after PHP update **White screen of death** Your website shows a white page. This is often caused by an incompatible plugin. Disable all plugins via FTP (rename the `/wp-content/plugins` folder to `/wp-content/plugins-disabled`). Then activate them one by one to find the culprit. **Fatal errors about deprecated functions** PHP 8.0+ has removed old functions that still worked in PHP 7. Check your error logs (often in `/wp-content/debug.log` or via your hosting control panel). Look for the plugin or theme causing the problem and update it. **Website works but admin area doesn't** Sometimes the frontend works fine but you can't log in to WordPress. This is often caused by incompatible caching plugins. Clear your cache via FTP by deleting the cache directory. **Performance worsens after update** Strange but true: sometimes your site seems slower after a PHP update. This is because your caching plugins need to re-optimize. Clear all caches and let your site "warm up" for an hour. This often resolves itself. ## Best practices for a safe PHP update **1. Always make a backup** Before you start updating, make a complete backup of your files AND database. Many hosting providers have automatic backups, but also make a manual backup via a plugin like UpdraftPlus. **2. Update outside peak hours** Schedule your update at a time when your website has few visitors. Check Google Analytics for your quiet hours. This is usually at night or early morning. **3. Monitor your website after the update** Keep a close eye on your website for the first hours after the update. Check your error logs, test important functions like contact forms and checkout process. **4. Update WordPress and plugins first** Always update WordPress core and all your plugins to the latest versions before updating PHP. This maximizes compatibility. **5. Document your PHP settings** Take a screenshot or note of your current PHP settings (memory limit, max execution time, etc.) so you can compare them after the update. ## Frequently asked questions **Should I go directly to PHP 8.3 or can I update gradually?** If you're still on PHP 7.4, it's best to go directly to PHP 8.1 or 8.2. PHP 8.0 is already "end of life" and no longer receives updates. PHP 8.3 is the newest but some plugins haven't been tested with it yet. PHP 8.2 is a safe choice for now. **What if my hosting provider doesn't offer a new PHP version?** Then it's time to switch hosting providers. Every good hosting provider supports at least PHP 8.1. Providers that only offer old PHP versions don't take security seriously. **Can I go back to my old PHP version if there are problems?** Yes, with almost all hosting providers you can simply switch back to your old PHP version via the same menu where you made the update. Your changes will be preserved.

Was this article helpful?

Compare hosting packages directly to find the best choice for your situation.