As you probably already know, now in WordPress version 5.1 PHP 7.3 is the recommended version of PHP to run a WordPress site, but you don’t have to worry because many older versions of PHP are still supported today and your site will be working fine.
You should consider upgrading to PHP 7.3
PHP language is evolving always even if it might not often feel that way. PHP has been powering most of the internet for a couple of decades.
A part of the success story has been the fact that WordPress, the most popular website platform in the world, is built on it.
PHP version 5 was first released in 2004(!), and 5.6 was the last version of PHP 5 that was still recently supported. It reached its end-of-life at the beginning of 2019, so it was a good time to upgrade.
Now WordPress is checking which version of PHP your site is running. Your WordPress installation will work fine with older versions but you have to consider the long-term health of your website. Faster and safer up-to-date version PHP 7.3 is the recommended version for WordPress but if you try to update your site likely you will get a “500 Internal Server Error” message.
What is a “500 Internal Server Error” message
Before we fix this issue we need to know what exactly this problem is. All messages who starting with 5** are in general HTTP response status codes that meant something has gone wrong on the web site’s server.
500 Internal Server Error means that your request from the server could not be completed and the server could not be more specific on what the exact problem is.
Fix “500 Internal Server Error” an get WordPress work with PHP 7.3
This error caused by mysql_connect() function. The PHP 7.3 inside cPanel has mysqli extensions disabled by default so we have to enable them manually. The steps are simple. All we need is access to our cPanel and follow this process.
- Navigate to your cPanel account
- Enter Software > Select PHP Version
- Select PHP 7.3 from the drop-down menu
- Select packages nd_mysqli and nd_pdo_mysql
- Just Save!
- Your site should be working fine now!
My site is still not working
If your site isn’t working after doing the above steps please take a look at your plugin list. It is possible to getting this error because you are missing another one PHP package.
For example if you are using WooCommerce and you have installed an external payment gateway for a bank this plugin could require
ioncube_loader in order to decode the PHP code and fix the “500 Internal Server Error” message for your site.
Please take a closer look at your plugins list and make sure that you already know what every plugin you have installed on your WordPress site is doing. If you need further assistance do not hesitate to leave a comment on the form below 🙂
4 thoughts on “How to update a WordPress site to PHP 7.3 without “500 Internal Server Error””
Thanks a lot, I just added the additional settings in the php panel, works 100% and loads much faster.
Great! Nice to help you Nick!
Greetings from Colombia!
you saved me!
Ivé got a question: I´ve update succesfully to 7.3 php version but on my wordpress panel still appears the “update required” ¿is this normal?
Hey Leonardo! Glad to help you 🙂 Can you please send us an email to firstname.lastname@example.org with your WordPress admin details in order to take a look at your problem?
would this also work when updating to PHP 8.0 on my Wordpress site?
Updating in PHP 8.0 should not have any problems if you enable all the PHP packages both your host and WordPress wants.