BT Panel is a powerful and easy-to-use server management tool that helps users efficiently manage websites, databases, FTP, and more. During use, you may often need to switch PHP versions to meet different website needs. This article will guide you through how to quickly switch PHP versions in BT Panel.
First, you need to log in to BT Panel. Once logged in, find the 'Website' option in the left sidebar, and click to access the website list page. Then, select the website for which you want to switch the PHP version and click the 'Settings' button to access the website's settings page.
In the website settings page, find the 'Web' tab. In the 'PHP Version' dropdown menu, select the PHP version you need. BT Panel supports multiple PHP versions, such as PHP5.6, PHP7.2, PHP7.3, and more. Choose the appropriate version based on your needs. After selecting, click the 'Save' button.
After selecting the PHP version, you need to restart the website for the changes to take effect. In the upper right corner of the website settings page, you will see a 'Restart' button. Click this button to restart the website. Wait a moment for the website to restart.
In addition to switching PHP versions through the BT Panel interface, you can also use the command line to perform this operation. Below are code examples for switching between two common PHP versions. Choose the appropriate one based on your needs:
<span class="fun">ln -sf /www/server/php/72/bin/php /usr/bin/php</span>
<span class="fun">ln -sf /www/server/php/72/bin/phpize /usr/bin/phpize</span>
<span class="fun">ln -sf /www/server/php/72/bin/php-config /usr/bin/php-config</span>
<span class="fun">ln -sf /www/server/php/72/bin/pear /usr/bin/pear</span>
<span class="fun">ln -sf /www/server/php/73/bin/php /usr/bin/php</span>
<span class="fun">ln -sf /www/server/php/73/bin/phpize /usr/bin/phpize</span>
<span class="fun">ln -sf /www/server/php/73/bin/php-config /usr/bin/php-config</span>
<span class="fun">ln -sf /www/server/php/73/bin/pear /usr/bin/pear</span>
By following the simple steps and commands above, you can easily switch PHP versions in BT Panel to meet the needs of different websites. We hope this article is helpful and makes it easier for you to manage websites using BT Panel. Stay tuned for more tutorials.