DirectAdmin Tutorials

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

Finding it difficult to deal with PHP errors on your website? Planning to downgrade/upgrade PHP Version for your website? You have landed on the right place. In this guide, you will learn to change PHP version on DirectAdmin Server.

Now, let’s check the steps to change the PHP version for your website using DirectAdmin Panel.

Steps to Change PHP Version for DirectAdmin Server without Cloudlinux

1. Login to your DirectAdmin account.

2. In the top-right corner, select the domain for which the PHP version needs to be changed.

php maangement

3. In the right-side bar, you will get to see the PHP version installed on the domain along with other basic details for that account. Here click on Change.

selector

4. Select the PHP version that you want to install from the drop-down menu and click on the Save button.

select php version min
save min

5. You will get a success message once the PHP version is saved as below:

saved

In this way, you can change the PHP version for your domain from DirectAdmin server without Cloudlinux.

Steps to Change PHP Version for DirectAdmin Server with Cloudlinux

1. Login to your DirectAdmin account.

2. In the top-right corner, select the domain for which the PHP version needs to be changed.

php maangement 1

3. Go to the Extra Features section and click on Select PHP version.

extra fetaures min 1024x156 1

4. It will redirect you to the page of Select PHP version, where you can select the PHP version you want to install from the drop-down menu to change the PHP version.

selec php version page min 1024x384 1

5. Then click on Set as current besides the drop-down to set the selected PHP version.

set as current min 1024x188 1

Steps to Check the PHP Version for Your Website

1. At first, create a file with any name in the home directory of the domain. For this, go to System Info & Files and click on File Manager. Here click on public_html folder in the left-side bar.

file manager min

2. Then click on New -> Text File -> PHP. Enter the name of the file and click on Create. For example, we will create phpinfo.php.

Screenshot 1

3. You will get a success message once the file is created as below:

Screenshot 2

Here, the file path will be /home/sites/25b/c/c05c6a1682ogoies.in/public_html/phpinfo.php

4. Right-click on the file and click on Edit. Then add the below line of code in the file and click on Save:

<?php

phpinfo();

?>

edit min
add code min 1024x475 1

6. Then browse www.visualwebtechnologies.in/phpinfo.php for testing the current PHP Version. You will see the PHP Info webpage with all the PHP variables and settings.

Your URL will be yourdomainname.com/phpinfo.php

Now, you can change PHP version on Direactadmin Server for your websites and also, check the current PHP verification on the website with these simple steps.

Leave a Reply