How To Change PHP Version In cPanel

Learning how to change PHP version in cPanel is a simple process that allows you to optimise performance, improve compatibility with scripts, or enable new features and tools for your website. This guide will walk you through the steps using your cPanel control panel in your Domains.co.za Web Hosting plan.

How to Change PHP Version in cPanel

Here are the steps to update the PHP version for your website via cPanel.

1. Login to your Domains.co.za account.

Change PHP Version In cPanel - Domains.co.za Login Page

2. Click on Manage Services on the left-hand side and select Web Hosting from the drop-down menu.

3. Click Manage next to your domain.

Change PHP Version In cPanel - Manage Web Hosting

4. Next, click the Login button next to Control Panel to access your cPanel dashboard.

Change PHP Version In cPanel - Login To cPanel

5. In the Software section of your cPanel dashboard, click on Select PHP Version.

Change PHP Version In cPanel - Select PHP Version

6. You’ll see the current PHP version your site is running. Click the dropdown list to see the available options (e.g., 7.4, 8.0, 8.1, 8.2).

Change PHP Version In cPanel - Current PHP Version

Note: At the time of writing, the latest version is 8.2.

7. Select the version you want to use and click Apply to activate it.

Change PHP Version In cPanel - PHP Version Options

8. Changes are saved automatically once you tick or untick extensions.

9. Open your site in a new window as a visitor to ensure it works as expected with the new PHP version.

If you experience any problems with functionality or compatibility, repeat the steps above and select a different version. If you still experience issues, please contact our Support Team.

Additional Information

Why Change the PHP Version

PHP (PHP: Hypertext Preprocessor) is a widely used, open-source scripting language designed for web development. When it comes to your website, PHP code is executed on the server, meaning the server processes the PHP code and then sends the resulting HTML (or other data) to the browser for display.

It is widely used for building websites, most notably WordPress sites, handling forms, managing sessions, and interacting with databases like MySQL.

Upgrading may require compatibility checks and small code adjustments, but the benefits far outweigh the risks of staying on an outdated version.

  • Performance Boost: Newer PHP versions often come with speed and memory usage improvements.
  • Improved Security: Using supported versions helps keep your website safe from vulnerabilities that hackers and malware can exploit.
  • Compatibility: CMS platforms like WordPress recommend using newer PHP versions for full functionality with the latest core software updates.
  • Better Error Handling: Updated PHP versions include enhanced error reporting, making debugging easier.

Before You Change PHP Version

Like making any major change to your website, there are a few things you should do first to make sure everything goes smoothly.

  • Backup First: Always back up your site before making any changes to server settings. This ensures you can roll back if needed.
  • WordPress Users: Use the PHP Compatibility Checker plugin to identify potential issues with plugins or themes before upgrading PHP.
  • Use a Staging Environment: If you’re unsure whether your site is compatible with a newer PHP version, clone it to a staging area first and test it before making the change on your live site.
  • Plugin/Theme Updates: Ensure all your WordPress (or other CMS) themes and plugins are up to date before switching PHP versions. Incompatible plugins can crash your site.
  • Clear Caches: If your site uses caching (e.g., WP Super Cache, W3 Total Cache, or a CDN like Cloudflare), clear all caches after switching PHP versions to prevent outdated files from causing display or functionality issues.
  • Error Logs: If your site breaks after updating to a new version, check the error_log files in the cPanel File Manager section to identify the issues.

What Our Customers say...