Skip to content
InMotion Hosting Logo InMotion Hosting Home
  • Chat Now Start a Live Chat
  • Call Us
    +1 757 416 6575
    +44 2045 763722
  •   Guides
  • Visit Our Support Center
  • 0 Cart
  • Live Chat
  • AMP Login
  • Support Center
  • Shopping Cart 0
Main Menu
  • Web Hosting
    Shared Hosting Fast, Reliable & Secure
    Reseller Hosting White-label cPanel/WHM for Resellers
    Domains Find The Perfect Domain Name
    View All Web Hosting Plans
  • WordPress
    Hosting for WordPress Classic Hosting with Email and cPanel Included
    UltraStack ONE for WordPress Superior Speed for Mission-Critical Sites
    VPS Hosting for WordPress Optimized Servers with Flexible Control
    WooCommerce Hosting
    WooCommerce Hosting Engineered for Performance and Security
  • VPS Hosting
  • Dedicated Servers
    Managed Dedicated Servers Protect Your Business with Secure, Scalable Infrastructure
    Enterprise Hosting Solutions Custom Bare Metal Solutions for Your Unique Workloads
  • Website Services NEW
    Managed Hosting
    Server Management Strategic SysAdmin Support & Custom Solutions
    Managed Services for WordPress Fully Managed WordPress on Fast and Secure Infrastructure
    Web Design Services
    Custom Website Design Stand Out with a Custom Design for Your Brand
    QuickSite Quality Websites Designed from Premium Templates
    Website Rebuild Modernize Your Legacy Site for Performance and Growth
    View All Website Services
    Maintenance Services
    Maintenance Plans Keep Your WordPress Site Running Smoothly
    SEO Services Get Found, Grow Traffic, Rank Better
    Speed Optimization Improve Load Time and Performance
    Hacked Site Repair Expert Malware Removal and Website Restoration
  • Company
    About Us
    Data Centers
    Managed Hosting
    Affiliate Program
    Contact Us
    Resources
    Blog
  • Start a Live Chat
  • +1 757 416 6575
  • +44 2045 763722
  • +1 757 416 6575
    +44 2045 763722
  • Visit Our Support Center
  • 0 Cart
Login
Support Center
    • Product Guides
      Backup ManagerShared HostingManaged VPS HostingCloud Server HostingDedicated HostingReseller HostingWordPress HostingInMotion CentralSprout InvoicesSoftaculousWebProweForms
    • Knowledge Base
      Account Management PanelBackups and RestorationsDatabasesDomain NamesEmailGitGoogle WorkspaceHacked WebsitesNGINXPHP-FPMSearch Engine OptimizationSecurityServer TechnologiesSSH and Root AccessSSL CertificatesWebsiteWebsite Error Numbers
    • Education Channels
      AndroidAnsibleApacheBoldGridControl Web PanelcPanelCyberPanelDiscordDrupalHubSpotiPhoneJoomla 4Live BroadcastingMagentoMoodleOpenCartPrestashopWebHost Manager (WHM)WooCommerceWordPress
    • Tools & Resources
      What is My IP AddressBlacklist CheckBounce Back ParserDomain CheckerEmail ConfigurationVisual DNS LookupFree Favicon Generator
    • Community
    • Blog
  • Community
  • Blog
  1. InMotion Hosting Home
  2. Support
  3. Education Channels
  4. Control Web Panel
  5. CWP Admin
  6. User and Account Management
  7. Change PHP Version in Control Web Panel (CWP)

Change PHP Version in Control Web Panel (CWP)

Updated on June 4, 2024 by InMotion Hosting Contributor

4 Minutes, 6 Seconds to Read

Change PHP Version in Control Web Panel - PHP Version Switcher & PHP Selector
Change PHP Version in Control Web Panel - PHP Version Switcher & PHP Selector

PHP is a popular programming language for dynamic site generation and integrating databases into web applications. Notable examples include the WordPress content management system (CMS), WHMCS billing system, PHP app hosting, and Nextcloud personal cloud storage solution.

This high popularity results in a frequent need to upgrade or simply change PHP versions. A new version of PHP is released more than annually to include security bug fixes and new features. However, which PHP version(s) you need in Control Web Panel (CWP) depends on the applications you need. Below we’ll cover how to change the primary PHP version and select a specific version for different user accounts.

  • Change PHP Version in CWP
    • Install Multiple PHP Versions
  • Set Multiple PHP versions with PHP Selector
    • Manually Set Multiple PHP Versions
  • Edit PHP.ini in CWP
    • Create a PHPInfo.php File

Change PHP Version in CWP

Follow these steps to change the main PHP version in CWP. Generally, you should select the latest version. But if you have PHP applications installed, check the software documentation as you might be better off with the recommended version instead.

  1. Log into CWP as an administrator.
  2. On the left, search for and select PHP Version Switcher.
  3. Select a version from the drop-down menu.
    Control Web Panel PHP Version Switcher
  4. A list of available PHP modules will pop up below. The default options will suffice for most use cases. Unselected options you may need depending on software installed include ioncube (for WHMCS), mongodb, and redis.
    Install PHP extensions in Control Web Panel (CWP)
  5. After customizing your PHP build, select Save & Build at the bottom.

The page will refresh with a progress bar while compiling PHP in the background. This may take over thirty (30) minutes depending on your CWP server’s performance capabilities. You can select View log to check the PHP installation process. You can also find the same info from the CWP terminal with the following command:

tail -f /var/log/php-rebuild.log

Install Multiple PHP Versions

Administrators with a CWPpro license can install different PHP versions within CWP.

  1. On the left, select PHP Selector.
  2. Major PHP versions will be listed. To the right of each major is a drop-down menu to specify a minor PHP version to install and links to modify PHP options (extensions). Make a selection in every drop-down menu for major PHP versions you wish to install.
    Install multiple PHP versions in control Web Panel (CWPpro)
  3. Select Start Compiler (build & install).

Non-CWPpro users needing multiple PHP versions can try installing them from CWP terminal, but you’ll also have to manage it there.

Set Multiple PHP versions with PHP Selector

CWPpro end users can change PHP versions per domain. The process is pretty straightforward.

  1. On the left, select CWP Settings > Php Selector.
  2. Choose a domain from the drop-down menu.
    Choose a PHP version for a domain in Control Web Panel (CWPpro)
  3. Select from the available PHP versions.
  4. Select Update Version.

Manually Set Multiple PHP Versions 

Users not on a CWPpro server will still be able to see the PHP Selector. However, you won’t be able to make changes and there will be an alert stating “You need a CWPPRO license to use this module. Contact your server administrator.” 

We recommend Non-CWPpro users (on an Apache web server) ask your server administrator to install the PHP versions you need so that you can set multiple PHP versions in .htaccess. You can edit this file from File Management > File Manager. You can also do this in the command-line interface (CLI) if shell access is enabled for your user account.

Edit PHP.ini in CWP

Even with the correct PHP version you may need to make further changes for optimal PHP application performance. This section covers how to customize your PHP configuration file in CWP.

  1. On the left, select CWP Settings > Edit php.ini.
  2. Select a domain from the top if you have more than one under the account.
  3. Make changes as needed. The most commonly modified attributes are upload_max_filesize, memory_limit, and max_execution_time. Also, display_errors should be set to “Off,” unless you’re troubleshooting development issues.
    Control Web Panel php.ini editor
  4. Once you’re finished making changes, select Update changes on the right.
  5. (Optional) To add more custom changes, select Advanced Editor to edit the raw php.ini file.
    Advanced php.ini editor in Control Web Panel
    Select Save on the right once you’re done.

Create a PHPInfo.php File

To ensure your configuration works, you can create a phpinfo.php file. 

  1. From the user panel, select File Management > File Manager.
  2. Use the left-hand sidebar and navigate to the root directory for your website.
  3. At the top, select File, and type a PHP file name. “phpinfo.php” is a common name but it can be named anything with a “.php” extension.
  4. Click Save. 
  5. Select the third (edit) button under the “Actions” column for the new PHP file.
    Edit phpinfo.php in Control Web Panel (CWP) File Manager
  6. Add the following code block:
    <? phpinfo(); ?>
    Add PHP info code in Control Web Panel File Manager
  7. Click Save on the right.
  8. Visit the PHP info page in your browser.
Create phpinfo Page

Let us know if you have questions about configuring PHP on your CWP server.

Make sure your business, agency, or reseller clients are always connected and powered on with our optimized Managed VPS Hosting.
InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting
Related Articles
How to List Accounts in Control Web Panel (CWP)
Migrating Accounts from cPanel to CWP
How to Create Packages in Control Web Panel (CWP)
Change PHP Version in Control Web Panel (CWP)
Add a Control Web Panel (CWP) User

Post navigation

SEOPress: How to Add Meta Descriptions
Website Lifespan: Tips for Keeping Your Website Useful Long-Term
Latest Support Articles
  • How to Publish Your Lovable Created React WebApp to UltraStack ONE for React
  • Why You Need To Keep Your Website’s PHP Version Up-to-Date
  • How to Publish Your Lovable Created React WebApp to InMotion Hosting via GitHub
  • How to Run & Read a Traceroute
  • Complete Guide to WordPress Widgets: How to Add, Customize, and Manage
  • How to Import a Table using phpMyAdmin
  • Email Error – Mailbox Quota Exceeded
  • Cleaning Up Old Post Metadata in WordPress
  • How to Create an Email Account in InMotion Central
  • InMotion Central for Advanced Users
  • How to Create a New Project With InMotion Central
  • Cache Manager for cPanel
  • How to Optimize your WordPress Database with WP-Optimize Settings
Control Panels
  • Account Management Panel
  • cPanel
  • Control Web Panel
  • CyberPanel
  • InMotion Central
  • Softaculous
  • WebHost Manager (WHM)
  • WebPro
Popular Tutorials
  • Backups and Restorations
  • Databases
  • DNS and Nameserver Changes
  • eCommerce
  • Email Basics
  • Git
  • Google Tools
  • Hosting Product Guides
  • NGINX
  • Secure Socket Layer (SSL)
  • Security
  • SSH and Root Access
  • Website Error Numbers
  • WordPress
  • WooCommerce

Need More Help?

Search our Help Articles
Current Customers

Chat: Chat with Sales
Call: 757-416-6575 x2
Ticket: Submit a Support Ticket

Get Reliable Web Hosting

Chat: Chat with Sales
Email: [email protected]
Call: 757-416-6575 x1

Get web hosting that grows with your business. Our all-in-one hosting platform gives you everything your website needs to scale - so you can focus on the next big thing for you and your business.

InMotion Hosting Logo

InMotionHosting.com provides web hosting, cloud-based solutions and managed services to businesses and entrepreneurs across the globe.

Follow Us

Web Hosting
  • Shared Hosting
  • Hosting for WordPress
  • Managed WordPress
  • UltraStack ONE for WordPress
  • VPS Hosting
  • Cloud VPS
  • Dedicated Server Hosting
  • Bare Metal Servers
  • Enterprise Hosting Solutions
  • OpenMetal Cloud IaaS
  • Reseller Hosting
  • Reseller VPS
  • Minecraft Server Hosting
  • eCommerce Hosting
Hosting Tools
  • WordPress
  • WooCommerce Hosting
  • Drupal Hosting
  • Joomla Hosting
  • cPanel Hosting
  • PHP Hosting
  • Magento Hosting
  • PrestaShop Hosting
  • Laravel Hosting
  • Ubuntu Hosting
  • Linux Hosting
  • WebPro Dashboard
  • WordPress Website Builder
  • Domain Names
Support
  • Live Chat
  • +1 757 416 6575
  • +44 2045 763722
  • Support Center
  • Resources
  • Community Support
  • WordPress Tutorials
  • InMotion Solutions
  • Managed Hosting
  • Website Transfers
  • Data Center Locations
  • Los Angeles Data Center
  • Ashburn Data Center
  • Amsterdam Data Center
About Us
  • Contact Us
  • About Us
  • Blog
  • News
  • Careers
  • Affiliate Program
  • Refer a Friend
  • Student Web Hosting
  • Sitemap
  • Cookies Settings
  • Accessibility (ADA) Settings

Copyright © 2002-2025 InMotion Hosting, Inc. All Rights Reserved. InMotion Hosting® is a registered trademark of InMotion Hosting, Inc.

Terms of Service | Privacy Policy | DPA | Accessibility Statement | Legal Inquiries
Do Not Sell My Personal Information | Limit Use of My Sensitive Personal Information

By using this website or chat features, you signify that you agree to be bound by these Universal Terms of Service