elfsightSkip to content
Configuring Custom PHP Services from cPanel

Configuring Custom PHP Services from cPanel

Configuring custom PHP services from cPanel. Configuring PHP services in cPanel is a simple and flexible process that gives you complete control over the behavior of web applications.

By choosing the right version and adjusting important variables, you can ensure compatibility, performance and stability for your website.

Configuring custom PHP services?

What does custom PHP configuration mean?

cPanel offers users the ability to adjust PHP versions and associated settings according to the needs of web applications.

By configuring PHP services, you can modify parameters such as memory limits, execution duration, uploaded file sizes and other options that influence the behavior of web applications written in PHP.

Accessing the PHP version manager

To start PHP configuration, follow the steps below:

  1. Log into cPanel using your account credentials.
  2. In the Software section, access the Select PHP Version or MultiPHP Manager option (the name may vary depending on server configuration).

Changing the PHP version for a domain

In “MultiPHP Manager” you can select the PHP version for each hosted domain:

  • Select the domain from the list.
  • Choose the desired PHP version from the dropdown menu.
  • Press the Apply button to save the change.

Configuring PHP variables (php.ini)

After choosing the PHP version, you can configure custom variables:

  1. Return to “Select PHP Version”.
  2. Press Options next to the current version.
  3. Here you can modify settings such as:
    • memory_limit – maximum memory limit (ex: 256M)
    • upload_max_filesize – maximum size of uploaded files
    • post_max_size – maximum limit for POST data
    • max_execution_time – maximum execution time for scripts
    • display_errors – error display (enable/disable)
  4. Changes are saved automatically in most modern cPanel panels.

Using the .user.ini file for advanced settings

If you want to apply PHP settings only in a specific directory, create a file named .user.ini in that directory and add the necessary lines. Example:

memory_limit = 256M
upload_max_filesize = 50M
post_max_size = 100M

Checking active PHP settings

To confirm the active values of PHP variables, create a file named info.php with the following content:

<?php
phpinfo();
?>

Then access the file in your browser (ex: https://your-domain.com/info.php) to see all information about the current PHP configuration.

Recommendations for performance and security

  • Don’t set excessive values for memory_limit or max_execution_time, to avoid unnecessary resource consumption.
  • Avoid enabling the display_errors option in production environments.
  • Keep PHP updated to benefit from security patches and performance improvements.

Special SEO Services – We offer specialized SEO optimization and search engine marketing services. Contact us now!

Previous post
Next article

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top
ROEN