Home WebServer PanelDirectAdmin Change the PHP version for a Subdomain on DirectAdmin

Change the PHP version for a Subdomain on DirectAdmin

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

In this article, AZDIGI will show you how to change the PHP version for a subdomain on DirectAdmin with a few simple steps. In some cases, you create a subdomain and run it with a different website, but you don’t want to run the same PHP version with the main domain because the source code of both requires different PHP configurations. And how to solve that problem, you can refer to the steps below.

Step 1: Determine the Subdomain that needs to change PHP

First, you need to log in to your DirectAdmin. Next, you need to determine the subdomain to be manipulated and proceed to check the current PHP version in use before changing.

For example:

  • The primary domain: thegioibecon.com
  • Subdomain: sub.thegioibecon.com

Now I will create an info PHP file to check the PHP version on the main domain and subdomain first. You can refer to how to create the info file here.

After creating the info file and trying to access it, the result is that my main domain and subdomain are running the same PHP version, which is 7.2.

Change the PHP version for a Subdomain on DirectAdmin

Step 2: Change the PHP version for the subdomain

To change PHP for a Subdomain, at the DirectAdmin interface, you access Account Manager => Subdomain Management

Change the PHP version for a Subdomain on DirectAdmin

At the subdomain that needs to change PHP, click on the pen 🖍 icon corresponding to that subdomain.

Change the PHP version for a Subdomain on DirectAdmin

Next, select the PHP version you need to change (1) and click Save (2).

Change the PHP version for a Subdomain on DirectAdmin
I will change the PHP 7.4 version for the subdomain.

If you see a message like this, you have successfully changed the PHP version.

Change the PHP version for a Subdomain on DirectAdmin

Step 3: Check the result

After you have determined and changed the PHP version for the subdomain you need, you can access the previously created info file and check the PHP version between the main domain and the subdomain.

And below is my result after changing:

Change the PHP version for a Subdomain on DirectAdmin

As you can see, I have successfully changed the PHP for the subdomain from 7.2 to 7.4.

Above are details on how to change the PHP version for a subdomain on DirectAdmin extremely simple. Changing PHP on a subdomain will help you a lot when creating many websites with different source codes on the subdomain. Hope this article is helpful to you, wish you success!

You can refer to other instructions at the link below:

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign