If your site is running on an older version of PHP, updating to the latest version will give you immediate performance gains:
- Faster websites – Newer PHP versions are faster. PHP 7.4 is significantly faster than the previous versions, and with faster execution times and less memory usage, especially WordPress sites will benefit.
- Better security – The most obvious reason to update is security. Newer versions are better at countering hackers, for example, because deprecated (outdated) code is no longer supported.
- New features and improvements – As with all updates, a newer version includes new features and improvements on how to do things, for example, preloading.
Considerations for upgrading PHP version
Before making the switch, you need to be aware of backward compatibility issues with scripts. Older PHP coding may not be compatible with newer PHP versions. Avoid skipping versions, and instead, make updates incrementally. It is important to check the compatibility of your site against new versions of PHP before upgrading to the next.
Sites built with WordPress can use the PHP Compatibility Checker plugin. You can also check PHP Manual for reviewing the new and deprecated features of PHP. When you are making the large jump between PHP versions, it is a good idea to create a staging site first, and check compatibility there.
For WordPress, before changing the PHP version you should first make sure that you have updated your website to the latest version and removed any plugins, themes, or old installations that you don’t use.
Upgrade PHP version
- Log into your DirectAdmin control panel.
- Navigate to Account Management > Domain Setup
- Click on the name of the domain for which you want to change the PHP version.
- Click on the “PHP Version Selector” button on the right
- Choose the appropriate version from the dropdown and click Save.
- Check your website, fix any errors that occur. You can either do it yourself or find a developer who can help you.
If you don’t see the “PHP Version Selector” button or you see it but it is not offering the PHP version you want, just contact our support team and we will install the PHP version on the server so you can later choose it.