Method 1: MultiPHP INI Editor
- Log in to cPanel.
- In the Software section, click MultiPHP INI Editor.
- Select your domain.
- In Basic Mode, find max_execution_time and enter a higher value (e.g. 300 for five minutes).
- Click Apply.
Method 2: PHP Selector options
If your server uses the CloudLinux PHP Selector:- In cPanel, click Select PHP Version → Options.
- Find max_execution_time and set the value.
Method 3: .htaccess
On servers where PHP runs in a mode that allows it, you can add this to your .htaccess:If adding php_value lines to .htaccess causes a 500 error, your PHP handler doesn’t accept them — remove the line and use Method 1 or 2 instead.
Method 4: In the script
For a single script:Related limits
Long-running tasks often hit other limits at the same time. Consider raising these too:- memory_limit — memory available to the script (e.g. 256M)
- upload_max_filesize and post_max_size — for large file uploads
- max_input_time — time allowed to parse input data