How to Set Default PHP Version

Introduction

PHP is the server-side scripting language used by most modern websites and applications, including:

Your hosting account allows you to select the PHP version used by your website. Choosing the correct PHP version is important for:


Why Change PHP Version?

You may need to change your PHP version if:

Situation

Reason

Website showing errors

PHP incompatibility

Plugin/theme not working

Requires different PHP version

Website slow

Older PHP versions are slower

Security concerns

Old PHP versions are unsupported

Installing new applications

Application requires latest PHP


Recommended PHP Versions

PHP Version

Status

PHP 8.3

Recommended

PHP 8.2

Stable

PHP 8.1

Supported

PHP 7.x

Older / Less Secure

Always use the latest PHP version compatible with your application.


Before Changing PHP Version

Before switching PHP versions:


Step 1: Log in to cPanel

Open your cPanel login URL:

https://yourdomain.com:2083

or access through:

https://my.govaio.com/login

Enter your cPanel username and password.


Step 2: Open PHP Version Manager

Depending on server configuration, open one of the following:

Select PHP Version

or

MultiPHP Manager

or

PHP Selector

These options are usually located under the:


Method 1: Change PHP Version Using Select PHP Version

This is the most common method on CloudLinux hosting servers.


Step 1: Open Select PHP Version

Click:

Select PHP Version

Step 2: Choose PHP Version

You will see a dropdown menu containing available PHP versions.

Example:

PHP 8.3

Select your desired PHP version.


Step 3: Apply Changes

Click:

Set as Current

Your new PHP version will now be activated.


Method 2: Change PHP Version Using MultiPHP Manager

Some servers use MultiPHP Manager instead.


Step 1: Open MultiPHP Manager

Click:

MultiPHP Manager

Step 2: Select Domain

Choose the domain you want to modify.

Example:

yourdomain.com

Step 3: Select PHP Version

Choose desired PHP version from dropdown.

Example:

ea-php83

Step 4: Apply PHP Version

Click:

Apply

How to Verify PHP Version

You can confirm PHP version using:


Method 1: cPanel PHP Selector

Reopen PHP selector to verify selected version.


Method 2: Create phpinfo File

Create a file named:

phpinfo.php

Add:

<?php
phpinfo();
?>

Upload inside:

public_html

Open in browser:

https://yourdomain.com/phpinfo.php

You will see detailed PHP configuration information.

Delete this file after testing for security reasons.


Common PHP Extensions

Some applications require additional PHP extensions.

Popular extensions:

Extension

Purpose

mysqli

MySQL database support

curl

External API requests

gd

Image processing

zip

ZIP archive handling

intl

Internationalization

mbstring

Multibyte string handling


How to Enable PHP Extensions

Inside:

Select PHP Version

You may enable or disable extensions using checkboxes.


Common PHP Errors After Version Change

1. Website Showing White Screen

Cause:

Incompatible plugins or themes.

Solution:


2. Deprecated PHP Warnings

Cause:

Old scripts incompatible with new PHP version.

Solution:


3. 500 Internal Server Error

Cause:

Unsupported PHP functions or .htaccess issues.

Solution:


4. Website Not Loading

Cause:

Missing PHP extensions.

Solution:

Enable required PHP modules.


Recommended PHP Settings

Typical recommended settings:

Setting

Recommended Value

memory_limit

256M

upload_max_filesize

128M

post_max_size

128M

max_execution_time

300


How to Change PHP Settings

Inside:

Select PHP Version

Click:

Options

Modify PHP configuration values.


Best PHP Version for Popular Applications

Application

Recommended PHP

WordPress

PHP 8.2 / 8.3

Laravel

PHP 8.2+

WHMCS

PHP 8.1+

Magento

PHP 8.2


Security Recommendations


Frequently Asked Questions (FAQ)

Q1. Which PHP version is best?

PHP 8.3 is generally recommended for performance and security.


Q2. Will changing PHP version affect my website?

Possibly. Some older applications may become incompatible.


Q3. Can I use different PHP versions for different domains?

Yes. Many hosting servers support per-domain PHP versions.


Q4. What if my website breaks after changing PHP version?

Switch back to the previous PHP version and check compatibility.


Q5. How do I know which PHP version my website needs?

Check your application documentation or hosting support recommendations.


Need Help?

If you need assistance changing or troubleshooting PHP versions, contact support:

📧 support@govaio.com