PHP version and PHP settings: how to change them (and what to do about errors after an upgrade)
At WebOké, you choose which PHP version your website uses, and you adjust settings yourself such as upload_max_filesize, memory_limit and max_execution_time. You do this in DirectAdmin with Select PHP version. Does your site stop working after an upgrade? Further on you'll read what to do then.
Changing the PHP version
- Log in to DirectAdmin: in My WebOké go to My Products and click DirectAdmin next to your hosting package.
- Under Extra Features, click Select PHP version.
- Choose the version you want from the dropdown list and save your choice.

Test your website right after making the change. If something stops working, read the section below.
Your site stops working after a PHP upgrade
Is your site blank, do you see an error message, or has part of it stopped working? This is almost always caused by a plugin, a theme, or custom code that isn't compatible with the new version.
- Revert to the previous version. In Select PHP version, choose the version you had before. Your site will immediately work as it did before. Customised extensions and options from the new version are kept for a future attempt.
- Find the error in the error log. In DirectAdmin, under System Info & Files, click Site Summary & Logs, then click Error Log next to your domain. Look at the bottom for lines containing
PHP Fatal errororPHP Warning. The path usually shows which plugin or theme is causing the problem. If you don't see anything useful, read Showing PHP errors without editing php.ini. - Update your software. Make a backup first. Then update WordPress (or your other software), your theme, and your plugins while the old PHP version is still active. Remove plugins you don't use.
- Try again. Switch the new version back on, test your site, and check the error log again.

If you see Call to undefined function, a PHP extension is often missing. You can switch this on yourself, see below.
Switching on an extension, such as ionCube
Some paid software, such as certain plugins or webshop modules, is encrypted. It only works with a loader: ionCube (ioncube_loader) or SourceGuardian (sourceguardian). The maker of the software will tell you which one you need. You'll often see this in a message like "requires the ionCube PHP Loader".
- Open Select PHP version and check at the top that the correct version is selected. Extensions are set per PHP version.
- Go to the Extensions tab.
- Check
ioncube_loader(or the extension you need). The change takes effect within a minute.

Changing PHP settings
- Open Select PHP version and go to the Options tab.
- Adjust the setting you need, for example
upload_max_filesizefor larger uploads. In that case, also increasepost_max_size. - The change is saved immediately.
This way, you don't need to add anything to an .htaccess file.
Prefer to have it sorted out for you?
Can't get it working, or hasn't your website been updated in years? With the PHP upgrade service, we'll make your website compatible with a current PHP version, for a fixed price. If it doesn't work out, you'll get your money back. Read Having a PHP upgrade done.
Also see in the DirectAdmin manual: PHP options: upload_max_filesize, memory_limit and max_execution_time, Switching PHP extensions on and off, and Errors after a PHP upgrade and finding the error log.
Detailed explanation with screenshots: Choosing the PHP version (Select PHP version) in the DirectAdmin manual.
