Skip to content

PHP max_execution_time

max_execution_time is the longest PHP lets a script run before it stops it. It’s a safety net: a script stuck in a loop can’t keep the server busy forever.

A normal page is built in well under a second, far from this limit. Long tasks are a different story: importing products, updating many plugins at once, creating a backup, regenerating images. When such a task reaches the limit, PHP stops it halfway, and the error log shows “Maximum execution time of … seconds exceeded”. The task is then often left incomplete.

What counts toward the limit depends on the system. On Linux, PHP usually counts only the time it spends working itself; waiting for the database or for another server doesn’t count. Some PHP builds count the full elapsed time instead.

The limit also isn’t the only one. The web server and any proxy in front of it have their own timeouts and can end a request earlier, which visitors see as an error such as “504 Gateway Timeout”.

Server: The hosting provider sets the limit in PHP’s configuration, and the web server’s timeouts on top. On some plans, sites can’t change it.

WordPress: Plugins that run long tasks often raise the limit for themselves, if the server allows it, or split the work into smaller steps. Tasks run by a server cron job or from the command line usually have no limit at all.

The Max execution time card is in System info, tab Server & System, under PHP. It shows the limit in seconds, with the note Per request, or No limit. Permo reads the value in a normal web request, not from the command line, where there’s no limit. The card gives context; Permo doesn’t rate it, not even when the limit is short.

PHP’s default is 30 seconds; from the command line, there’s no limit (source: php.net, Runtime configuration, accessed October 16, 2026).

Sources