![Change PHP Versions in CyberPanel](https://www.inmotionhosting.com/support/wp-content/uploads/2022/07/cyberpanel-php-change-versions-1024x538.jpg)
Knowing how to change PHP versions for PHP website hosting is important because a new version releases at least annually. However, sometimes you may need to use an older PHP version until one of your web applications releases an update to support the latest version. Other times you might just need to increase the system resources that can be used for certain PHP operations. Fortunately, CyberPanel allows you to configure different PHP configurations for separate websites.
Change PHP Versions for Websites
CyberPanel installs multiple PHP versions by default so you don’t need to install them manually. These steps will guide you through changing PHP versions for one website at a time.
- Log into CyberPanel.
- On the left, select Websites > List Websites.
- On the right-side of a domain, select Manage.
- Under Configurations, select Change PHP.
- Select a different PHP version from the drop-down menu and select the Change PHP button underneath it.
Install PHP Extensions
It is generally recommended to uninstall anything you don’t need on a system. Each PHP version comes with dozens of extensions installed by default. Here’s how to install and uninstall extensions for each PHP version.
- On the left, select PHP > Install Extensions.
- Select a PHP version from the drop-down menu.
- Select Install or Uninstall next to a PHP extension in the list.
- Once the bottom of the progress window reads PHP Extension Installed or PHP Extension Removed, select Go Back.
How to Edit php.ini
Sometimes, having the correct PHP version for your website is not enough. Some applications require a higher allotment of memory for resource-intensive operations or file upload size for larger files to meet your demands. Below are two ways to configure PHP settings including memory limit, max execution time, and upload max file size.
- Select PHP > Edit PHP Configs.
- Select a PHP version from the drop-down menu.
- Make changes as needed.
- At the bottom, Save Changes.
- Restart PHP.
Advanced Editor
If you need to make more in-depth changes, you can edit the raw php.ini file in CyberPanel. This is helpful because not all options you might need will always be available in the admin dashboard.
- Select PHP > Edit PHP Configs.
- At the top, select Advanced.
- Select a PHP version from the drop-down menu.
- Edit the php.ini file in the text window.
- Save Changes at the bottom.
- Restart PHP.
Check PHP Changes with phpinfo.php
The “phpinfo” PHP function generates a page listing information about a particular PHP version configuration on your system. Helpful info includes the full file path to the php.ini file and variations between server settings and a specific user’s custom settings for a PHP version.
The common usage is to name the file “phpinfo.php” but some bots search for this file as reconnaissance before cyber attacks. Therefore, below we recommend being creative with the filename.
- From the dashboard, select Websites > List Websites > File Manager. Or, log into the CyberPanel VPS with FTP or SSH.
- Enter the public_html directory.
- Create a new file titled “phpcheck.php,” or something creative, and edit it.
- Add the following:
<?php phpinfo(); ?>
- Save the file.
- Open the file in a web browser (e.g. example.com/phpcheck.php).
![Create phpinfo Page](https://www.inmotionhosting.com/support/wp-content/uploads/2011/11/php_create-php-info-page_this-is-what-a-phpinfo-file-loos-like.gif)
Learn more about how to manage your CyberPanel server.
If you don’t need cPanel, don't pay for it. Only pay for what you need with our scalable Cloud VPS Hosting.
CentOS, Debian, or Ubuntu
No Bloatware
SSH and Root Access
It would have been helpful if I could find “On the left, select Websites > List Websites.”
But since there is no “Websites” among my headings on the left, I roamed hopelessly around looking for how to do a simple PHP update. The only dropdown options I found were for old PHP. Maybe a screenshot of what we are supposed to see. Still looking. Still can’t find how to update. Still getting messages on my website every day telling me I need to update.
It sounds like you may be running an older version of CyberPanel, in which case these steps would differ. Your dashboard should resemble this:
![View of CyberPanel](https://www.inmotionhosting.com/support/wp-content/uploads/2022/06/cyberpanel-dashboard-1536x864.png)
If it does not look like that, you may have to Upgrade CyberPanel before you can follow this guide.