Cloud Service >> Knowledgebase >> How To >> How to Change and Check the PHP Version of a Domain on DirectAdmin Server
submit query

Cut Hosting Costs! Submit Query Today!

How to Change and Check the PHP Version of a Domain on DirectAdmin Server

DirectAdmin allows you to easily change and check the PHP version for individual domains hosted on your server. This is particularly useful when different websites or applications require different versions of PHP. Follow this step-by-step guide to change or check the PHP version for your domain in DirectAdmin.

Step-by-Step Guide to Check PHP Version

1. Log in to DirectAdmin

Log in to your DirectAdmin control panel using your username and password.

2. Navigate to the Domain Management Section

On the DirectAdmin dashboard, go to Account Manager and click on Domain Setup.

3. Select the Domain

Choose the domain for which you want to check or change the PHP version.

4. View the Current PHP Version

Once you select the domain, you will see the current PHP version displayed under PHP Versions.

Step-by-Step Guide to Change PHP Version

1. Log in to DirectAdmin

Access your DirectAdmin control panel with your login credentials.

2. Go to the Domain Setup Section

In the Account Manager section, click on Domain Setup.

3. Choose the Domain

Select the domain for which you wish to change the PHP version.

4. Change the PHP Version

1. After selecting the domain, you will find the PHP Version Selector section.

2. Here, you can choose between different available PHP versions (for example, PHP 7.3, 7.4, 8.0, etc.).

3. Select the desired PHP version from the dropdown list.

5. Save the Changes

fter selecting the PHP version, click Save or Update to apply the changes.

6. Verify the PHP Version

Once the PHP version has been updated, you can verify the change by going to the PHP Info section or by using a PHP file on your website that displays the current PHP version.

Alternative Method Using .htaccess (For Custom PHP Versions)

If your web hosting issuer lets in a couple of PHP variations at the server, you can additionally be able to change the PHP version using enhancing the .htaccess record on your domain's root folder.

Steps:

1. Access your domain’s root directory via FTP or File Manager.

2. Edit or create a .htaccess file.

Add the following line of code to specify the PHP version (replace php70 with the version you want to use):
plaintext
PHP Versions

3. Save the file and refresh your website to apply the changes.

Troubleshooting PHP Version Issues

1. Website Compatibility Issues: After converting the PHP model, a few websites may additionally see compatibility problems if the code is old or makes use of deprecated functions. In such cases, it’s really useful to improve the web page’s code or revert to the preceding PHP version.

2. Error 500 After Changing PHP Version: If your website suggests an HTTP 500 error after switching the PHP model, check your website’s error logs for unique problems or attempt reverting to a distinct PHP model.

 

3. PHP Modules: Some packages might also require precise PHP modules to feature well. Make sure to verify that the required modules are enabled on your preferred PHP version.

 

By following those steps, you can without difficulty take a look at and change the PHP model in your domain in DirectAdmin. This ensures your internet site is jogging on a compatible version of PHP, improving overall performance and safety.

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!