How to Manage and Update PHP Settings in cPanel

How to Manage and Update PHP Settings in cPanel

Summary

This guide explains how to view and change your PHP version, adjust PHP configuration options, and manage extensions using cPanel's MultiPHP Manager and MultiPHP INI Editor. These tools help you optimise performance, improve compatibility, and troubleshoot issues with PHP-based applications.

  1. Understanding PHP Management in cPanel

cPanel provides two main tools for PHP configuration:

  • MultiPHP Manager
    Used to change the PHP version for each domain.
  • MultiPHP INI Editor
    Used to adjust PHP settings such as memory limits, upload sizes, and execution time.

These tools allow you to customise PHP behaviour without editing configuration files manually.

  1. Changing the PHP Version (MultiPHP Manager)

Different applications may require different PHP versions. To update the version for a domain:

  1. Log in to your cPanel dashboard.
  2. Scroll to the Software section.
  3. Select MultiPHP Manager.
  4. Tick the domain you want to modify.
  5. Choose a PHP version from the dropdown menu.
  6. Click Apply.

Your domain will now run on the selected PHP version.

When to change PHP versions

  • Your CMS or plugins require a newer version.
  • You need compatibility with older scripts.
  • You want performance improvements or security updates.
  1. Editing PHP Settings (MultiPHP INI Editor)

The MultiPHP INI Editor allows you to adjust common PHP configuration values.

  1. Go to the Software section.
  2. Select MultiPHP INI Editor.
  3. Choose the domain you want to configure.

You will see a list of editable settings.

  1. Common PHP Settings You May Need to Adjust

memory_limit

Controls how much memory a script can use.

  • Example: Increase to 256M or 512M for large CMS sites.

upload_max_filesize

Maximum size of uploaded files.

  • Increase if you need to upload large media files.

post_max_size

Must be equal to or larger than upload_max_filesize.

max_execution_time

How long a script can run before timing out.

  • Increase for long-running imports or backups.

max_input_vars

Controls how many form fields PHP can process.

  • Useful for large menus or theme settings in CMS platforms.

After making changes, click Save.

  1. Managing PHP Extensions

Some applications require specific PHP extensions, such as cURL, mbstring, or intl.

To manage extensions:

  1. Open MultiPHP INI Editor.
  2. Scroll to the bottom of the page.
  3. Look for the Editor Mode section.
  4. Enable or disable extensions by adding or removing lines such as:

extension=intl extension=mbstring

Note: Some hosting providers manage extensions automatically, so availability may vary.

  1. Resetting PHP Settings

If you make changes that cause errors, you can reset the configuration:

  1. Open MultiPHP INI Editor.
  2. Choose the domain.
  3. Click Reset to Defaults.

This restores the default PHP settings for your hosting environment.

  1. Troubleshooting Common PHP Issues

Website Shows a 500 Error

  • PHP version may be incompatible.
  • Try switching to a different version.
  • Check error logs for details.

Uploads Not Working

  • Increase upload_max_filesize and post_max_size.
  • Ensure your CMS settings match the new limits.

Scripts Timing Out

  • Increase max_execution_time.
  • Optimise the script if possible.

Missing PHP Extensions

  • Enable the required extension in the INI Editor.
  • If unavailable, contact support.

Changes Not Taking Effect

  • Clear your CMS cache.
  • Restart any caching plugins or modules.
Kas see vastus oli kasulik?

Seotud artiklid

How to Create and Manage Email Accounts in cPanel

This guide explains how to create, manage, and access email accounts for your domain using...

Using phpMyAdmin to Manage MySQL Databases

This guide explains how to use phpMyAdmin in cPanel to view, edit, and manage your MySQL...

Managing Domains and Subdomains in cPanel

This guide explains how to manage your domains and subdomains in cPanel, including adding new...

Understanding and Using cPanel File Manager

This guide explains how to use the cPanel File Manager to upload, edit, organise, and manage...

Setting Up and Managing FTP Accounts

This guide explains how to create, configure, and manage FTP accounts in cPanel. You will learn...

Powered by WHMCompleteSolution