Get a free website with any plan

See how
WORDPRESS

Fixing "Maximum execution time exceeded"

Last updated

IN SHORT

A PHP execution timeout occurs on Flashcloud hosting when a script runs longer than the server's max_execution_time setting. You can raise this limit in cPanel through the MultiPHP INI Editor. Raising the limit buys time, but you still need to fix the root cause, such as heavy imports, slow database queries, or looping code.

"Maximum execution time exceeded" (or "Fatal error: Maximum execution time of 30 seconds exceeded") means a PHP script ran longer than the server's max_execution_time setting and got killed mid-run. The fastest fix is usually raising that limit in cPanel → Software → MultiPHP INI Editor, but that's a bandage. The real question is why the script took that long in the first place, and on shared hosting there's a limit to how far you should push it.

Raise the limit first

Open MultiPHP INI Editor in cPanel. Switch to Editor Mode, pick the domain or home directory from the dropdown, and find max_execution_time. Raise it, for example from 30 to 300, and save.

This is a per-domain setting, not something you toggle from the PHP Version tile in the portal, that tile only switches the PHP version (7.4 through 8.3), not the ini values around it.

If you're not sure whether the timeout is really the problem, check the error first. A generic 500 with no specific message could be something else entirely, in which case start with fixing the WordPress white screen of death instead.

The three most likely causes

A plugin or import task doing too much in one request

WordPress plugin updates, theme installs, large media imports, and "one click" migration or backup tools frequently blow past 30 seconds because they're doing everything (download, unzip, database writes) inside a single HTTP request instead of a background job. If the timeout hits during a specific action, that action is the cause. Try running it again with a raised limit. If it still times out, look for a background-job alternative in the plugin, or split the operation into smaller batches (fewer posts per import run, smaller file chunks).

A slow or blocked database query

If PHP is waiting on MySQL and the query never returns in reasonable time, execution time runs out even though the script itself is simple. This shows up during large table operations, missing indexes on a big table, or a lock held by another process. If you're also seeing connection errors alongside the timeout, that points more specifically at "MySQL server has gone away" and connection limit errors rather than a pure execution-time problem. For a straightforward slow query, check whether the table needs an index, or whether a plugin is running an expensive query on every page load. That's also a common cause of a site that's generally sluggish rather than timing out on one action alone; see WordPress Site Health warnings and which ones matter for related performance context.

An infinite loop or unbounded recursion in custom code

If the timeout happens on every request to a specific custom page, script, or API endpoint rather than during an occasional admin task, suspect a loop that never terminates or a recursive function without a proper base case. Turn on error logging and add temporary debug output (or check existing logs) to see where execution actually stops. If you're debugging a WordPress-specific case, fixing the WordPress white screen of death covers the same wp-config.php debug flags (WP_DEBUG, WP_DEBUG_LOG) that help surface where a script is stalling, not where it errors outright.

Fix steps in order

  1. Confirm the exact error and which action triggers it (a specific plugin action, a specific page, or a bulk import).
  2. Raise max_execution_time in MultiPHP INI Editor and retry. If it now completes, you've bought time. Treat this as a symptom, not a fix. If the task keeps growing (more products, more posts, more traffic), it will hit the new limit eventually too.
  3. If it's a one-time task (migration, import, bulk update), look for a way to run it from the command line if you have SSH access. Command-line PHP isn't bound by the web server's max_execution_time the same way. There's no web request to time out.
  4. If it's a recurring page load or API call, profile the slow part: database query, external API call, or loop. Fix the code rather than continuing to raise the limit.
  5. If a cron job is what's timing out, check Cron Jobs in cPanel and consider running heavy scheduled tasks via a direct script call (if you have SSH/shell access) rather than a web-triggered endpoint.

When to contact support

If you've raised max_execution_time to a reasonable value and a normal-sized operation still times out, or if the timeout happens inconsistently on the same task, open a ticket from the portal (Support). Include the exact error text, the page or action that triggers it, and roughly how long it runs before failing. That's enough for a real person to check server-side conditions that aren't visible from cPanel alone.

Common questions

How do I increase the PHP execution time limit?

Change it in MultiPHP INI Editor inside cPanel. Switch to Editor Mode, select your domain from the dropdown, and increase the max_execution_time value.

Why does my WordPress import keep timing out?

Large imports pack file downloads, extraction, and database writes into a single web request that runs out of time. Split the import into smaller batches, or run the task from the command line using SSH.

Can I change my execution time from the PHP Version tile in the portal?

No, that tile only switches your PHP version between 7.4 and 8.3. You must configure timeout values per domain inside cPanel using MultiPHP INI Editor.

What details should I send to support if raising the limit fails?

Open a ticket in the portal with the exact error message. State the specific action that triggered the error and roughly how many seconds the script ran before it failed.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.