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.
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 1 php maangement](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/php-maangement-1024x111.png)
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.
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 2 selector](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/selector-1024x430.png)
4. Select the PHP version that you want to install from the drop-down menu and click on the Save button.
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 3 select php version min](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/select-php-version-min.jpg)
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 4 save min](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/save-min.jpg)
5. You will get a success message once the PHP version is saved as below:
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 5 saved](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/saved-1024x397.png)
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.
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 6 php maangement 1](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/php-maangement-1-1024x111.png)
3. Go to the Extra Features section and click on Select PHP version.
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 7 extra fetaures min 1024x156 1](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/extra-fetaures-min-1024x156-1.jpg)
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.
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 8 selec php version page min 1024x384 1](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/selec-php-version-page-min-1024x384-1.jpg)
5. Then click on Set as current besides the drop-down to set the selected PHP version.
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 9 set as current min 1024x188 1](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/set-as-current-min-1024x188-1.jpg)
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.
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 10 file manager min](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/file-manager-min.jpg)
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.
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 11 Screenshot 1](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/Screenshot_1-1024x382.png)
3. You will get a success message once the file is created as below:
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 12 Screenshot 2](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/Screenshot_2-1024x230.png)
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();
?>
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 13 edit min](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/edit-min.jpg)
![How to Change and Check the PHP Version of a Domain on DirectAdmin Server? 14 add code min 1024x475 1](https://visualwebtechnologies.com/blog/wp-content/uploads/2021/04/add-code-min-1024x475-1.jpg)
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.