How to Use MultiPHP Manager and PHP INI Editor in cPanel

Managing PHP versions and configurations for your websites is crucial for performance and compatibility. cPanel provides two powerful tools for this purpose: MultiPHP Manager and PHP INI Editor. This article will guide you through their usage, including changing PHP versions, understanding the "Inherited" option, and customizing PHP settings.


What Is MultiPHP Manager?

MultiPHP Manager allows you to manage PHP versions for your domains or subdomains. You can assign different PHP versions to different websites on your hosting account, ensuring compatibility with various applications.

Key Features of MultiPHP Manager:

  • Assign PHP versions per domain.
  • Use the "Inherited" setting to apply server-wide defaults.
  • Easily switch between PHP versions without affecting other sites.

How to Use MultiPHP Manager

Step 1: Access MultiPHP Manager

  1. Log in to your cPanel account.
  2. Navigate to the Software section.
  3. Click on MultiPHP Manager.

Step 2: View Available Domains

You’ll see a list of all domains and subdomains associated with your account.

Step 3: Assign PHP Versions

  1. Select the checkbox next to the domain or subdomain you want to modify.
  2. From the PHP Version dropdown menu, choose the desired PHP version (e.g., 7.4, 8.0, 8.1).
  3. Click Apply to save the changes.

Step 4: Understand the "Inherited" Option

  • When a domain's PHP version is set to "Inherited," it uses the default PHP version configured by the server administrator.
  • To override the inherited setting, manually select a PHP version for the domain.

What Is PHP INI Editor?

The PHP INI Editor is a tool that allows you to modify PHP configuration settings for your websites. These settings are stored in the php.ini file, which controls various aspects of PHP’s behavior.


How to Use PHP INI Editor

Step 1: Access PHP INI Editor

  1. Log in to your cPanel account.
  2. Navigate to the Software section.
  3. Click on PHP INI Editor.

Step 2: Choose an Editor Mode

  • Basic Mode: Simplifies common PHP settings like memory limits and file upload sizes.
  • Advanced Mode: Provides full control over all PHP directives.

Step 3: Modify PHP Settings

In Basic Mode

  1. Select the domain you want to configure.
  2. Modify settings like:
    • memory_limit: Maximum memory a script can use.
    • upload_max_filesize: Maximum size for file uploads.
    • post_max_size: Maximum size of POST requests.
  3. Click Apply to save changes.

In Advanced Mode

  1. Select the domain or subdomain.
  2. Edit specific PHP directives manually (e.g., max_execution_time, display_errors).
  3. Click Save to apply changes.

Common PHP Settings to Adjust

Setting Purpose Recommended Value
memory_limit Maximum memory a script can consume. 256M or higher
upload_max_filesize Maximum size of uploaded files. 50M or higher
max_execution_time Maximum time a script can run before being terminated. 300 seconds
post_max_size Maximum size of POST data, including file uploads. 50M or higher

FAQs

Q1: What happens if I choose the wrong PHP version?

Your website may stop functioning correctly if the PHP version is incompatible with your application. Use MultiPHP Manager to revert to a compatible version.

Q2: Can I customize settings for each domain?

Yes, both MultiPHP Manager and PHP INI Editor allow domain-specific configurations.

Q3: What is the difference between MultiPHP Manager and PHP Selector?

While similar, MultiPHP Manager is designed for cPanel environments, and PHP Selector is specific to CloudLinux-based hosting.


Troubleshooting

Issue 1: PHP Version Not Applying

  • Cause: Browser or server cache.
  • Solution: Clear your cache and verify settings in MultiPHP Manager.

Issue 2: Settings Not Taking Effect

  • Cause: Conflicts in .htaccess or server overrides.
  • Solution: Review your .htaccess file or consult your hosting provider.

Issue 3: Memory Limit Errors

  • Cause: Insufficient memory allocation for scripts.
  • Solution: Increase the memory_limit in PHP INI Editor.

Conclusion

MultiPHP Manager and PHP INI Editor are essential tools for managing PHP environments. With these tools, you can assign PHP versions, customize configurations, and troubleshoot issues effectively. If you encounter challenges, consult the troubleshooting section or contact your hosting provider for assistance.

Hasznosnak találta ezt a választ? 0 A felhasználók hasznosnak találták ezt (0 Szavazat)