Resolving WordPress Fatal Error: Maximum Execution Time Exceeded (2026)

TL;DR: The “Fatal error: Maximum execution time of X seconds exceeded” message indicates that PHP ran a script longer than your server allows before terminating it. To fix this, increase the max_execution_time in php.ini, .htaccess, wp-config.php, or user.ini. Identify the plugin, import job, or slow database query causing the timeout to prevent recurrence.

Last Updated: July 2026. Tested against WordPress 6.7 running PHP 8.3.

When you click “Update” or start a plugin installation, WordPress may stop with a message like: “Fatal error: Maximum execution time of 30 seconds exceeded in /home/yoursite/public_html/wp-includes/…”. This is the WordPress maximum execution time exceeded error, common among site owners.

The solution is typically a simple PHP configuration change. However, identifying the cause of the timeout is crucial to avoid future issues. This guide provides quick fixes and permanent solutions for shared hosting, managed WordPress hosting, and VPS environments in 2026.

What Causes the Maximum Execution Time Exceeded Error in WordPress?

PHP’s max_execution_time limits how long a script can run before the server terminates it. This limit is usually 30 seconds on shared hosting, 60 to 120 seconds on managed WordPress hosting, and customizable on a VPS.

Common causes for this error include:

  • Large content imports: Importing numerous WooCommerce products or large XML exports can exceed 30 seconds on underpowered servers.
  • Plugin or theme updates: Plugins that download large zip files can exceed the limit on slow connections.
  • Runaway plugins: Backup plugins, SEO tools, and broken API calls can loop indefinitely.
  • Slow database queries: Full table scans on large databases can stall beyond 30 seconds.
  • Image processing: Regenerating thumbnails for large media libraries is CPU-intensive.
  • WooCommerce operations: Complex calculations during checkout can cause timeouts.

Quick Diagnostic: Before You Change Any Settings

Before increasing the limit, identify the script causing the error. The error message provides the file path and line number. For example:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/user/public_html/wp-content/plugins/woocommerce/includes/class-wc-product.php on line 284

The path indicates WooCommerce was running when the timeout occurred. This helps determine if you need a server or plugin fix. If the path points to a rarely used or new plugin, deactivate it first and test before changing server settings.

Check your hosting control panel’s PHP error log for repeated timeouts from the same file to identify the cause.

How to Fix Maximum Execution Time in 2026: Four Methods Ranked

Increase max_execution_time based on your hosting environment:

Method File Best For Requires Server Access?
php.ini php.ini (root or per-directory) VPS, dedicated, cPanel with PHP Selector Sometimes
.htaccess .htaccess (site root) Apache shared hosting without php.ini access No (FTP/file manager)
wp-config.php wp-config.php Any WordPress site as a fallback No (FTP/file manager)
user.ini user.ini (site root or php folder) Nginx-based hosting, LiteSpeed, cPanel Nginx No (FTP/file manager)

Method 1: Edit php.ini

If you have access to php.ini through cPanel’s “PHP Selector,” MultiPHP Manager, or SSH, find the max_execution_time directive and change it:

max

Similar Posts