Gaming & Tech
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
- Open your web browser and navigate to
https://your-server-ip:2087
orhttps://your-server-hostname:2087
. - Enter your root username and password to log in.
Step 2: Access EasyApache 4
- After logging in, locate the “Software” section on the left-hand side menu.
- Click on “EasyApache 4”.
Step 3: Customize Your Profile
- In the EasyApache 4 interface, click on “Customize” to modify the current EasyApache 4 profile.
Step 4: Select PHP Version
- In the customization menu, click on the “PHP Versions” tab.
- 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).
- Check the box next to the PHP 7 version you want to install.
Step 5: Install PHP 7 with CloudLinux Selector
- Go back to the WHM homepage by clicking on the “Home” button.
- In the left-hand menu, scroll down to the “CloudLinux” section.
- Click on “PHP Selector”.
- In the PHP Selector interface, select the domains or users for whom you want to enable PHP 7.x.
- Choose PHP 7.x from the dropdown menu and click “Apply”.
Step 6: Install PHP Extensions
- Still within the PHP Selector interface, navigate to the “Extensions” tab.
- You will see a list of available extensions. Select the extensions you need for PHP 7.x.
- Click “Apply” to install the selected extensions.
Step 7: Review and Provision
- Go back to the EasyApache 4 interface.
- Click on the “Review” button at the bottom of the page to review the changes.
- Ensure that everything is correct, and then click on “Provision” to start the installation process.
Step 8: Wait for Installation
- WHM will now install the selected PHP 7 version along with the extensions and dependencies.
- 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:
- Go to “Home” in WHM.
- Navigate to “Software” and then click on “MultiPHP Manager”.
- In the MultiPHP Manager, select the domains you want to change to PHP 7.
- Choose the PHP 7 version from the “PHP Version” dropdown menu.
- Click “Apply” to set PHP 7 as the default version for the selected domains.
Step 10: Verify the PHP Version
- To verify that PHP 7 is installed and working correctly, create a PHP info file.
- Create a new file named
phpinfo.php
in the public_html directory of a test domain. - Add the following code to the file:
<?php
phpinfo();
?>
- Save the file and access it via your web browser by navigating to
http://your-domain.com/phpinfo.php
. - Check the PHP version displayed on the page to confirm that PHP 7 is active.
Step 11: Configure PHP Settings (Optional)
- If you need to customize PHP 7 settings, go to “Home” in WHM.
- Navigate to “Software” and click on “MultiPHP INI Editor”.
- Select the PHP 7 version from the dropdown menu.
- Adjust the settings as needed and save your changes.
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
Discover more from URBT News
Subscribe to get the latest posts sent to your email.