How to change the PHP version on cPanel
There are two ways to change the PHP version of your site, and both give the same result. On OuiHeberg web hosting, the PHP version tab in the client area is enough in most cases. In cPanel, the same setting lives in the MultiPHP Manager. This guide covers both, then what to check before and after the switch.
Change the PHP version in the client area
Log in to dash.ouiheberg.com. In the left menu, click My Services, then your hosting plan.
Open the PHP version tab.
In the PHP version per domain card, pick the new version from the domain's list.
Before applying it, dash asks you to confirm in a window that shows the current and the new version, for example mysite.com from PHP 8.1 to PHP 8.3. Confirm to apply it, or cancel to keep the current version. A warning is added if you move to an older version, or pick a version that no longer receives security fixes. The list flags these versions as end of support. Once confirmed, the new version applies almost at once, without taking the site offline. Each domain has its own list, so one site can stay on an older version while another moves to a recent one. The banner at the top of the page then shows the new version.

A recent version can break a site whose theme or plugins are old. Before switching, create an archive from the Backups tab and read the "Before changing PHP version" section below.
The hosting page is described in detail in the guide Access cPanel and manage your OuiHeberg web hosting.
Change PHP version with MultiPHP Manager
If you already work in cPanel, the same setting is in the MultiPHP Manager.
On the hosting page, click Advanced panel at the top right. cPanel opens straight away, with no login details to type.
In the Software section, click MultiPHP Manager. You can also type "MultiPHP" in the Search Tools bar at the top of the screen.
Under Set PHP Version per Domain, tick the box of the domain to change. You can tick several.
In the PHP Version list on the right, pick the version you want.
Click Apply.
The PHP Version column of the table then shows the new version. No restart is needed.

At the top of the page, System PHP Version shows the server's default version. A domain set to inherit follows that version. The PHP-FPM column shows that the domain runs through PHP-FPM, the way PHP runs on our servers.
Check your current PHP version
Several screens show the version a site uses.
In the client area, the banner of the hosting page and the PHP version tab.
In cPanel, the PHP Version column of the MultiPHP Manager. cPanel adds "Outdated" to versions that are no longer maintained.
In WordPress, the Tools › Site Health menu, Info tab, Server section.

With a phpinfo file
This file shows the exact version and the whole PHP configuration.
Create a
phpinfo.phpfile containing these lines.
<?php
phpinfo();
?>
Upload it to the site root, the
public_htmlfolder, with the cPanel File Manager or over FTP.Open
https://mysite.com/phpinfo.phpin your browser. The version appears at the top of the page.
Delete
phpinfo.phpas soon as you have read the version. It exposes the server configuration to every visitor.
Which PHP version should you choose?
Each PHP version gets two years of bug fixes, then two years of security fixes only. After that, it is no longer maintained at all. Here is where recent versions stand, according to the official PHP schedule.
| Version | Bug fixes | Security fixes |
|---|---|---|
| PHP 8.5 | until 31 December 2027 | until 31 December 2029 |
| PHP 8.4 | until 31 December 2026 | until 31 December 2028 |
| PHP 8.3 | ended | until 31 December 2027 |
| PHP 8.2 | ended | until 31 December 2026 |
| PHP 8.1 | ended | ended on 31 December 2025 |
| PHP 8.0 and older | ended | ended |
Pick a version that still gets security fixes, ideally the most recent one your site supports. An end-of-life version gets no fixes at all, even for a known flaw. We recommend PHP 8.3 or later, as does WordPress in its official requirements.
The MultiPHP Manager offers PHP 5.6 to PHP 8.5, plus inherit. The PHP version tab of the client area offers the same versions. The oldest ones stay available for sites that cannot switch yet, but they no longer get any fixes.
Before changing PHP version
A version change can be undone in a moment, but a broken site loses visitors. A few precautions avoid most problems.
Create an archive of the hosting in the Backups tab of the client area, with the Create an archive button.
Update your CMS (WordPress, PrestaShop, Joomla…), its theme and its plugins.
Check on each plugin's page which PHP version it supports. Plugins with no update for more than two years, old page builders and custom code cause the most trouble.
Write down the current version, so you can go back to it.
After the change, browse several pages of the site. Also test the forms, the admin login and, for a shop, the cart and checkout.
Revert to a previous PHP version
Does the site show an error after the change? Set the old version back, in the PHP version tab of the client area or in the MultiPHP Manager. Going back is as quick as the change. Then fix the plugin or theme at fault and try again.
Modify PHP settings (MultiPHP INI Editor)
The version is only one part of the PHP configuration. Memory per script, upload size and execution time are set in the PHP configuration card of the PHP version tab, or in the cPanel MultiPHP INI Editor. The guide How to modify PHP settings (php.ini) on cPanel explains each directive.
Do not add
php_value,php_flagorAddHandlerlines to the.htaccessfile by hand. PHP runs with PHP-FPM on our servers, and these lines cause a 500 error on the whole site. The MultiPHP Manager and the MultiPHP INI Editor write what is needed themselves.
Recommended PHP extensions for WordPress
WordPress and its plugins rely on PHP modules. The WordPress Site Health page reports any that are missing. The phpinfo file described above also lists them, one block per loaded module.
| Module | Role |
|---|---|
mysqli | database connection |
curl | HTTP requests (APIs, updates) |
gd or imagick | image processing |
mbstring | UTF-8 text |
xml | reading feeds and XML files |
zip | installing plugins and themes |
openssl | encrypted connections |
intl | languages, dates and regional formats |
exif | photo metadata |
fileinfo | type of uploaded files |
sodium | modern cryptography |
opcache | PHP code cache, for speed |
The json module has been part of PHP since version 8.0, so there is nothing to enable. If a module is missing from the chosen version, open a ticket with the domain and the PHP version.
Troubleshooting
500 error after changing the version
| Possible cause | Solution |
|---|---|
| Incompatible plugin | Rename the wp-content/plugins folder with the File Manager or over FTP. Restore its name, then reactivate the plugins one by one. |
| Incompatible theme | Activate a default WordPress theme. |
Forbidden line in .htaccess | Remove the php_value and php_flag lines (see below). |
| Not enough memory | Raise memory_limit in the PHP configuration card. |
Go back to the old version while you look for the cause.
500 error after a php_value in .htaccess
In cPanel, open the File Manager, then the
public_htmlfolder. If.htaccessdoes not appear, show hidden files in the File Manager settings.Edit
.htaccessand delete the lines that start withphp_valueorphp_flag.Save, then reload the site.
Set the value you wanted in the PHP configuration card of the client area or in the MultiPHP INI Editor.
If the file contains a block that starts with # php -- BEGIN cPanel-generated handler, do not edit, leave it as it is. The MultiPHP Manager writes it.
Slow site after a PHP update
Clear the cache of your caching plugin and of your browser, then update the plugins.
"Allowed memory size exhausted" message
Fatal error: Allowed memory size of 134217728 bytes exhausted
The script went over its memory allowance, here 134217728 bytes, or 128 MB. Raise memory_limit to 256M in the PHP configuration card of the PHP version tab. If the error comes back, look for the plugin that uses so much memory.
WordPress shows "Deprecated" warnings
Deprecated: Function ... is deprecated since version X.X
A plugin or the theme uses a function that PHP is going to remove. The site still works. Update WordPress, the plugins and the theme. If the warning stays, report it to the plugin's author. On a live site, hide these messages by setting display_errors to Off.
"Your PHP installation appears to be missing the MySQL extension"
The chosen version does not load the mysqli module. Go back to the previous version to bring the site back online, then open a ticket with the PHP version you want.
Need help?
Open a ticket from Tickets › Open a ticket (dash.ouiheberg.com/tickets/new), or click the Contact support tile at the bottom of your hosting page. You can also ask your question on our Discord.
cPanel hosting with email accounts and databases, managed from the OuiHeberg client area.
View plans →