04. Managing PHP Selectors and php.ini Directives Print

  • 0

Managing PHP Selectors and php.ini Directives

1. The Relationship Between Selector and php.ini

At Jiinubi, using the Select PHP Version tool in cPanel automatically generates the necessary directives for your account. However, you can manually override these settings using the MultiPHP INI Editor.

2. Using the MultiPHP INI Editor

  1. Log in to cPanel: Navigate to the Software section.
  2. Click MultiPHP INI Editor:
  3. Select a Location: Choose your domain from the dropdown menu.
  4. Basic Mode: A list of common directives will appear:
    • display_errors: Turn On when troubleshooting the "White Screen of Death."
    • max_execution_time: Maximum seconds a script can run.
    • memory_limit: Maximum RAM a script can use.
    • upload_max_filesize: Limit for individual file uploads.

3. Editor Mode (Advanced)

If you need to add a directive not listed in Basic Mode:

  1. Click the Editor Mode tab.
  2. Select your domain.
  3. Type the directive directly into the text editor (e.g., max_input_vars = 3000).
  4. Click Save.

4. Understanding Important Directives

Directive Recommended Value Why?
max_input_vars 3000 Required by many modern WordPress themes to save menu settings.
allow_url_fopen On Allows scripts to fetch data from external URLs (needed for some APIs).
zlib.output_compression Off Usually kept off to prevent conflicts with caching plugins.
short_open_tag Off Prevents PHP from recognizing <? as a start tag; better for security.

5. Where is my php.ini file?

Saving changes in the MultiPHP INI Editor creates or updates a php.ini file inside your domain's home directory (e.g., public_html/php.ini).

⚠ Caution: If you manually create a .user.ini or php.ini via File Manager, it may conflict with cPanel settings. Always use the MultiPHP INI Editor to ensure your changes are recognized by the server.

Was this answer helpful?

« Back