Changing the PHP version in DirectAdmin is a straightforward process. Follow these steps to update your PHP version:
Step-by-Step Guide:
-
Log in to your DirectAdmin Account:
- Open your web browser and navigate to your DirectAdmin login page.
- Enter your username and password, then click
Login
.
-
Navigate to the Domain Management Section:
- Once logged in, locate the
Account Manager
section. - Click on
Domain Setup
.
- Once logged in, locate the
-
Select the Domain:
- You will see a list of domains associated with your account.
- Click on the domain for which you want to change the PHP version.
-
Choose PHP Version:
- On the Domain Setup page, you will see an option for
PHP Version Selector
or similar. - Click on
PHP Version Selector
.
- On the Domain Setup page, you will see an option for
-
Select the Desired PHP Version:
- You will see a dropdown menu listing the available PHP versions.
- Select the PHP version you want to use from the dropdown menu.
-
Save Changes:
- After selecting the desired PHP version, click on
Save
orApply
. - This will change the PHP version for the selected domain.
- After selecting the desired PHP version, click on
-
Verify the Change:
- To ensure the PHP version has changed, you can create a
phpinfo.php
file. - Open the file manager in DirectAdmin, navigate to the root directory of your domain, and create a new file named
phpinfo.php
. - Add the following line of code to the file:
php
phpinfo();
- Save the file and access it via your web browser by navigating to
http://yourdomain.com/phpinfo.php
. - The PHP information page will display the current PHP version in use.
- To ensure the PHP version has changed, you can create a
Troubleshooting
- If you do not see the
PHP Version Selector
option, your hosting provider may have disabled it. Contact your hosting support for assistance. - Ensure that any custom settings or extensions needed for your website are configured correctly after changing the PHP version.
By following these steps, you can easily change the PHP version for your website hosted on DirectAdmin.