WEB HOSTING

How to modify PHP options values

Increasing the maximum size of certain PHP options may be necessary in some cases. For example, the file upload limit in WordPress is typically set to 2MB, preventing the upload of larger files.

However, this issue can be easily resolved, allowing you to increase the maximum size for your files, media uploads, and other PHP options, such as the memory limit, by using the methods outlined below.

Before proceeding, choose the method that suits you best: If your website is managed by CloudLinux, it is recommended to use the PHP Selector method. On the other hand, if it is managed by cPanel, the MultiPHP INI Editor method is more suitable.

If you are unable to select “Use PHP Selector,” contact our support by opening a ticket. (PHP FPM facilitates rapid communication between a web server and PHP and is controlled by your hosting provider).

PHP Selector Domain Name

PHP Selector

1- Log in to cPanel > Navigate to the Software category and click on Select PHP Version.

cPanel

2- Choose a custom PHP version from the dropdown list (a version different from the native version).

3- Click on “Use Defaults” to recheck all necessary modules.

4- Click on the “Switch to PHP Options” link.

PHP Options on PHP Selector

5- Increase the following values: upload_max_filesize, post_max_size, memory_limit. The smallest of these three values determines the maximum upload size (upload_max_filesize) and increases the maximum size of uploaded files.
PHP Options on PHP Selector

MultiPHP INI Editor

To increase the maximum size of certain PHP options (file upload size, memory limit, post_max_size) using the MultiPHP INI Editor method, follow the steps below:

1- Log in to your cPanel account.

2- Navigate to the Software section and click on MultiPHP INI Editor.

MultiPHP INI Editor cPanel

3- Select your domain name.

Domain Name MultiPHP INI Editor

4- Increase the desired values (upload_max_filesize refers to the maximum file upload size).

PHP Options on MultiPHP INI Editor

5- Click Apply.

Your file upload size has now been updated!

Video Tutorial

Articles Liés