Why this happens

Your hosting server enforces a maximum time a script is allowed to run, usually 30-60 seconds. If a plugin task, a database query, or an import process takes longer than that limit, PHP forcibly stops it and this error appears - even if the task would have eventually finished on its own.

Step-by-step fix

  1. Open wp-config.php and add this line: set_time_limit(300);
  2. If you have access to your hosting's .htaccess file, you can also add: php_value max_execution_time 300
  3. Check any recently installed or updated plugins - temporarily disable them to see if that's the cause.
  4. If the issue persists, contact your hosting provider - server resources may be limited.

How to prevent it happening again