How Do I Update or Change My PHP Version

Hosting Control Panel | Updated March 2026

Ultra Web Hosting runs CloudLinux with multiple PHP versions available simultaneously. You can change your PHP version per-domain directly from cPanel, and the change takes effect immediately with no downtime. This guide covers how to switch versions, when you'd want to, and how to handle compatibility issues.

01. Why Change Your PHP Version

The most common reasons to change PHP versions:

  • WordPress or plugin requires a newer version - WordPress 6.x requires PHP 7.4+ and recommends 8.1+. Some plugins and themes set their own minimums. You'll see a dashboard notice if your version is too old
  • Performance improvement - PHP 8.x can be 2-3x faster than 7.x for the same code. If your site feels slow, upgrading PHP is one of the easiest performance wins. See our WordPress Performance Guide
  • Security - older PHP versions stop receiving security patches. Running an unsupported version exposes your site to known vulnerabilities
  • Legacy software compatibility - occasionally you need to downgrade because an older application doesn't work with newer PHP. This is a temporary fix; the real solution is updating the application

02. Check Your Current PHP Version

There are several ways to check which PHP version your site is running:

From cPanel

Log into cPanel and look at the right sidebar. Your current PHP version is displayed in the "General Information" section. This shows the default version for your account.

From WordPress

In your WordPress admin, go to Tools > Site Health > Info > Server. The PHP version is listed there along with other server details.

With a phpinfo File

Create a file called phpinfo.php in your public_html directory with this content:

<?php phpinfo(); ?>

Visit yourdomain.com/phpinfo.php in your browser. The very first line shows the PHP version, and the rest of the page shows all loaded extensions and settings.

Warning

Delete the phpinfo.php file after checking. It exposes detailed server configuration information that attackers can use. Never leave a phpinfo file accessible on a production site.

03. How to Change PHP Version in cPanel

Ultra Web Hosting uses CloudLinux PHP Selector, which lets you change your PHP version and extensions without contacting support.

  1. Log into cPanel - go to your hosting control panel
  2. Find "Select PHP Version" - it's in the Software section. Click it
  3. Choose your version - use the dropdown at the top of the page to select the PHP version you want. Available versions typically range from PHP 7.4 through 8.3
  4. Click "Set as current" - the change takes effect immediately. No server restart or waiting required
Tip

If you see "MultiPHP Manager" instead of "Select PHP Version," the process is similar: click MultiPHP Manager, find your domain in the list, select the desired PHP version from the dropdown, and click Apply. Both tools accomplish the same thing.

Note

The PHP version change applies to your entire cPanel account (all domains and subdomains under that account). If you need different PHP versions for different domains, contact support and we can configure per-domain PHP handlers.

04. Managing PHP Extensions

PHP extensions add functionality like database connectivity (mysqli, pdo_mysql), image processing (gd, imagick), encryption (openssl), and more. Most extensions you need are enabled by default, but some applications require specific ones.

Enable or Disable Extensions

In the same "Select PHP Version" page where you change versions, you'll see a list of all available extensions with checkboxes. Check the ones you need, uncheck the ones you don't, and click "Save" at the bottom.

Commonly Required Extensions

  • WordPress - mysqli, curl, gd or imagick, mbstring, xml, zip, openssl (all enabled by default)
  • Laravel - all WordPress requirements plus bcmath, ctype, fileinfo, json, tokenizer
  • IonCube Loader - see our IonCube guide (available as a separate extension toggle)
  • Zend Guard - see our Zend Guard guide

05. Customizing php.ini Settings

You can customize PHP settings like memory limits, upload sizes, and execution time from cPanel without editing files manually.

Via PHP Selector

In the "Select PHP Version" page, click the "Options" tab. This shows common php.ini directives that you can change:

  • memory_limit - maximum memory a script can use. Default on our servers is 384MB. Increase if you get "Allowed memory size exhausted" errors
  • upload_max_filesize - maximum file upload size. Default varies; increase for large media uploads or plugin imports
  • post_max_size - must be equal to or larger than upload_max_filesize
  • max_execution_time - how long a script can run before it times out. Default is 30 seconds. Increase for long imports or migrations
  • max_input_vars - increase this if you have complex WooCommerce products or large forms that fail to save

Via .htaccess

You can also set PHP values in your .htaccess file. This is useful for per-directory overrides. See our .htaccess guide for syntax details.

php_value memory_limit 512M
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300

06. Which PHP Version Should I Use?

Legacy Only

PHP 7.4

  • End of life (no security patches)
  • Some old plugins still require it
  • Slower than 8.x
  • Use only as a temporary measure
  • Plan to upgrade your software
Tip

Before upgrading PHP, enable WordPress debug mode and check for deprecation notices. Install the "PHP Compatibility Checker" plugin to scan your themes and plugins for potential issues with the target PHP version. Most modern, maintained plugins work fine on PHP 8.x.

07. Troubleshooting After a Version Change

White Screen or 500 Error After Upgrading

This almost always means a plugin or theme uses syntax that's been removed in the newer PHP version. The fix:

  1. Switch back - change PHP back to the version that was working. Your site will come back immediately
  2. Enable debug mode - add WP_DEBUG to wp-config.php, switch PHP forward again, and check the error log for the specific file and function causing the issue
  3. Update the offending plugin/theme - most developers have released PHP 8.x compatible updates. If the plugin is abandoned, find an alternative

"Allowed Memory Size Exhausted"

This isn't usually caused by the PHP version change itself, but upgrading PHP can change memory usage patterns. Increase memory_limit in the PHP Selector Options tab (Section 5 above).

Functions or Extensions Missing

When you change PHP versions, your extension list resets to the defaults for that version. If your application needs specific extensions (like ioncube_loader, imagick, or intl), go back to the Select PHP Version page and enable them for the new version.

"Your PHP Installation Appears to Be Missing the MySQL Extension"

This WordPress error means the mysqli extension isn't enabled for your selected PHP version. Go to Select PHP Version, find mysqli in the extensions list, check it, and save.

Need Help With PHP Configuration?

If you're not sure which PHP version or settings your application needs, open a ticket and we'll check your site's compatibility and recommend the best configuration.

Open a Support Ticket

Quick Recap: PHP Version in 5 Steps

If you only do 5 things from this guide, do these:

  1. Use PHP 8.1+ if your software supports it - it's faster, safer, and uses less memory
  2. Change versions in cPanel - Select PHP Version > dropdown > Set as current
  3. Check extensions after switching - make sure mysqli, curl, gd, and any app-specific extensions are enabled
  4. Test your site immediately - visit every major page and form after the change
  5. Delete phpinfo.php - never leave it accessible on a live site

Last updated March 2026 · Browse all Hosting Control Panel articles

  • 6 Users Found This Useful

Was this answer helpful?

Related Articles

Increase PHP Memory

Fatal error: Allowed memory size of xxxxxxxxx bytes exhausted (tried to allocate xxxxxxxx bytes)....

HTTP Authentication error in PHP

A HTTP Authentication error in PHP occurs when the user is not authorized to access the requested...

How can I find my MariaDB - MySQL version?

Method 1: Through cPanel   Log in to your Ultra Web Hosting account. Click on the cPanel...

Test MySQL Connection

The following is a great way to verify a MySQL / MariaDB database connection issue. Create a file...

Strict Standards: Non-static method JLoader::register() should not be called statically in

The error message...  Strict Standards: Non-static method JLoader::register() should not be...



Save 30% on web hosting - Use coupon code Hosting30