How to Install PHP 7 in cPanel / WHM using Cloudlinux

Joseph Collins
August 13, 2024

Gaming & Tech

How to Install PHP 7 in cPanel / WHM using Cloudlinux

Avatar

Published

on

How to Install PHP 7 in cPanel / WHM using Cloudlinux

How to Install PHP 7 in cPanel WHM using CloudLinux

How to Install PHP 7 in cPanel WHM using CloudLinux

Prerequisites – How to Install PHP 7 in cPanel / WHM using Cloudlinux

  • Root Access: Ensure you have root access to the server.
  • cPanel and WHM Installed: This guide assumes you have a working installation of cPanel & WHM.
  • CloudLinux Installed: Ensure that your server is running CloudLinux, a widely-used OS for enhancing cPanel security and performance.
  • EasyApache 4 Installed: This guide assumes EasyApache 4 is already set up on your system.

Steps to Install PHP 7 in cPanel WHM using CloudLinux

Step 1: Log into WHM

  1. Open your web browser and navigate to https://your-server-ip:2087 or https://your-server-hostname:2087.
  2. Enter your root username and password to log in.

Step 2: Access EasyApache 4

  1. After logging in, locate the “Software” section on the left-hand side menu.
  2. Click on “EasyApache 4”.

Step 3: Customize Your Profile

  1. In the EasyApache 4 interface, click on “Customize” to modify the current EasyApache 4 profile.

Step 4: Select PHP Version

  1. In the customization menu, click on the “PHP Versions” tab.
  2. You will see a list of available PHP versions. Find PHP 7.x (where “x” refers to the specific version you want to install, such as 7.4).
  3. Check the box next to the PHP 7 version you want to install.

Step 5: Install PHP 7 with CloudLinux Selector

  1. Go back to the WHM homepage by clicking on the “Home” button.
  2. In the left-hand menu, scroll down to the “CloudLinux” section.
  3. Click on “PHP Selector”.
  4. In the PHP Selector interface, select the domains or users for whom you want to enable PHP 7.x.
  5. Choose PHP 7.x from the dropdown menu and click “Apply”.

Step 6: Install PHP Extensions

  1. Still within the PHP Selector interface, navigate to the “Extensions” tab.
  2. You will see a list of available extensions. Select the extensions you need for PHP 7.x.
  3. Click “Apply” to install the selected extensions.

Step 7: Review and Provision

  1. Go back to the EasyApache 4 interface.
  2. Click on the “Review” button at the bottom of the page to review the changes.
  3. Ensure that everything is correct, and then click on “Provision” to start the installation process.

Step 8: Wait for Installation

  1. WHM will now install the selected PHP 7 version along with the extensions and dependencies.
  2. Wait for the installation process to complete. You will see a success message once the process is finished.

Step 9: Set PHP 7 as the Default Version (Optional)

To set PHP 7 as the default version for all domains on the server:

  1. Go to “Home” in WHM.
  2. Navigate to “Software” and then click on “MultiPHP Manager”.
  3. In the MultiPHP Manager, select the domains you want to change to PHP 7.
  4. Choose the PHP 7 version from the “PHP Version” dropdown menu.
  5. Click “Apply” to set PHP 7 as the default version for the selected domains.

Step 10: Verify the PHP Version

  1. To verify that PHP 7 is installed and working correctly, create a PHP info file.
  2. Create a new file named phpinfo.php in the public_html directory of a test domain.
  3. Add the following code to the file:
<?php
phpinfo();
?>
  1. Save the file and access it via your web browser by navigating to http://your-domain.com/phpinfo.php.
  2. Check the PHP version displayed on the page to confirm that PHP 7 is active.

Step 11: Configure PHP Settings (Optional)

  1. If you need to customize PHP 7 settings, go to “Home” in WHM.
  2. Navigate to “Software” and click on “MultiPHP INI Editor”.
  3. Select the PHP 7 version from the dropdown menu.
  4. Adjust the settings as needed and save your changes.
“` You can copy and paste this HTML into your web page editor or CMS (Content Management System) to publish the guide online. It includes all the necessary steps and formatting for a professional and clear presentation.

How to Install PHP 7 in cPanel / WHM using Cloudlinux

If you’re looking to install PHP 7 on your server, you can easily do so using cPanel, WHM, and CloudLinux. With EasyApache 4, you can quickly set up the required PHP extensions and configurations. The PHP Selector in CloudLinux makes it straightforward to manage different PHP versions for specific users or domains. Using the MultiPHP Manager within WHM, you can set PHP 7 as the default version for your domains, ensuring that your websites run efficiently. For those with root access, this process is streamlined, and server administration becomes more effective with the flexibility of PHP 7.

CloudLinux Installation on WHM/cPanel Blocks Login: Here’s How to Fix It

If you encounter any issues, refer to the CloudLinux documentation or contact your hosting provider for assistance. “` You can copy and paste this HTML into your web page editor or CMS (Content Management System) to publish the guide online. It includes all the necessary steps and formatting for a professional and clear presentation.

Download the URBT News App from your App store. Apple / Andriod

Advertisement


Discover more from URBT News

Subscribe to get the latest posts sent to your email.

Copyright © 2024 URBT News is a division Urban TV Network Corp. Stock symbol URBT

share Share

Leave a Reply

Your email address will not be published. Required fields are marked *