Change PHP max_execution_time Safely
max_execution_time limits how long a PHP script is allowed to run. Increasing it can help a legitimate import or maintenance task, but it should not be used to hide a slow plugin, database problem or infinite loop.
Preferred approach
On managed hosting, use the hosting control panel’s PHP configuration screen because it edits the active PHP version and avoids changing the wrong file. Set a temporary value appropriate for the task, for example 120 or 300 seconds, then restore a normal limit afterwards.
If you manage php.ini
max_execution_time = 120Save the file and reload the relevant PHP service if your platform requires it.
Verify the active value
Use the hosting panel’s PHP information page or a short administrator-only diagnostic. Do not leave a public phpinfo() page online because it exposes detailed server configuration.
If a WordPress action still times out, also inspect the web server, proxy and hosting execution limits. A PHP value cannot override a shorter upstream timeout.