How to Change PHP version on Directadmin Server

Category : DirectAdmin

Are you facing PHP errors on your website? Want to downgrade/upgrade PHP Version for your website? Then you are in the right place. This guide will help you to change PHP version on Direactadmin Server.

Don’t own a Directadmin Server? Head to our website https://www.basezap.com and get your Blazing fast Directadmin Server in minutes today.

If you are looking to change PHP Version in cPanel then head over to the below guide.
Guide to Change PHP Version for Website in cPanel

Now, we will show you how you can change the PHP version for your Website using Directadmin Panel.

Changing PHP Version from Directadmin.

For DirectAdmin Server without Cloudlinux

  1. Login to your Directadmin account.
  2. On top, you can also select the domain for which the PHP version has to be changed.
    domain list
  3. Find the current PHP Version option in the left sidebar with other basic details for the account. Click the Change option. It will show you a similar UI like the image below.
    da sidebar
  4. Select the PHP Version from the dropdown menu and tap on Save Button.
    php selector

For CloudLinux Server users only.

  1. Login to your Directadmin account.
  2. On top, you can also select the domain for which the PHP version has to be changed.
    domain list
  3. Now search for Select PHP Version option in the Panel and click on it.
    select php version
  4. It will show the current PHP version and dropdown menu to change the PHP version.change php version

Checking PHP Version for your website.

  1. Create a file with any name in your home directory of the domain. We will use phpinfo.php for our file.
    Our file path will be /home/basezap/public_html/phpinfo.php
  2. Add the following line of code in the file and save it.
    <?php
    phpinfo();
    ?>
  3. Now we will open www.basezap.com/phpinfo.php to test the current PHP Version. It should show the PHP Info webpage with all the PHP variables and settings.
    Your URL will be yourdomainname.com/phpinfo.php
    current php version

With these above simple steps, we have showed how you can change PHP version on Direactadmin Server for your websites including the current PHP verification on the website.

Feel free to reach us out if you need kind of assistance with DirectAdmin, Cloudlinux, or any technical queries. Shoot us an email at [email protected], and our professional experts will get in touch with you.