Knowledgebase

How to install CWP (CentOS Web Panel) and configure it for PHP Selector

To install CentOS Web Panel (CWP) and configure it for PHP Selector, follow these steps:

Step 1: Connect to Your Server

Connect to your CentOS server via SSH using a terminal or an SSH client like PuTTY.

Step 2: Download and Install the CentOS Web Panel

Run the following command to download and install the CentOS Web Panel:

bash
cd /usr/local/src wget http://centos-webpanel.com/cwp-el7-latest sh cwp-el7-latest

Step 3: Access the Control Panel

Once the installation is complete, you can access the control panel by navigating to https://your-server-IP:2031 a web browser. Log in with the provided credentials.

Step 4: Set Up PHP Selector

  1. In the CWP control panel, go to PHP Settings under the PHP Selector section.

  2. Here, you can choose the PHP versions you want to make available to your users.

  3. Click on Edit PHP Version for the version you want to configure.

  4. You can select which PHP extensions you want to enable or disable for this version. Make sure to save your changes.

Step 5: Configure PHP Selector for Users

  1. To allow users to select their PHP version, you need to set up PHP Selector for individual users:

    • Navigate to User Accounts > User List.

    • Select the user you want to configure.

    • In the user settings, go to Web Template and choose default any other template that supports PHP Selector.

    • Save the changes.

Step 6: Enable PHP Selector for Users

  1. Go to User Accounts > User List.

  2. Click on the user you want to enable PHP Selector for.

  3. In the user settings, go to Select PHP Version.

  4. Here, the user can select the PHP version they want to use for their websites.

Step 7: Restart Apache

After making changes to the PHP settings, it's a good practice to restart Apache for the changes to take effect:

bash
service httpd restart

Step 8: Verify PHP Selector

Create a simple PHP script to verify that the PHP Selector is working correctly. For example, create a file called info.php with the following content:

php
<?php phpinfo(); ?>

Place this file in your web directory (/var/www/html/ by default) and access it through a web browser. It should display information about the PHP version and configuration.

That's it! You've now installed CentOS Web Panel and configured PHP Selector for your server. Remember to keep your server and control panel up to date for security and performance improvements.

 
  • 0 Users Found This Useful
Was this answer helpful?