How to Fix “Maximum Execution Time Exceeded” in WordPress

On this page
  1. Why This Error Happens
  2. Step 1: Increase the Limit via mybox Panel (Recommended)
  3. Step 2: Edit the .htaccess File
  4. Step 3: Edit the wp-config.php File
  5. Step 4: Identify the “Heavy” Plugin
  6. Maintenance for mybox Users
  7. Summary

The “Maximum Execution Time Exceeded” error is a common safety mechanism in PHP. It occurs when a script on your mybox-hosted site takes too long to complete a task, and the server shuts it down to prevent it from consuming all available resources. This often happens during heavy operations like updating large plugins, importing demo content, or processing massive image galleries.

Why This Error Happens

By default, servers limit how long a single script can run (often 30 or 60 seconds). If a task—like a complex database query or a slow connection to an external API—exceeds this limit, the server triggers a fatal error.

The most reliable way to fix this is at the server level within your hosting configuration.

  1. Log in to your mybox panel.
  2. Navigate to the PHP Settings section.
  3. Look for the variable named max_execution_time.
  4. Increase the value to 300 (which equals 5 minutes).
  5. Save your changes. This is the cleanest method because it updates the environment directly for your mybox-hosted site.

Step 2: Edit the .htaccess File

If you prefer to make changes via your site’s configuration files, you can use the .htaccess file.

  1. Access your site’s root directory via FTP
  2. Locate and edit the .htaccess file.
  3. Add the following line at the bottom: php_value max_execution_time 300
  4. Save and test your site.

Step 3: Edit the wp-config.php File

Alternatively, you can try to set the limit specifically for WordPress.

  1. Open your FTP client and find wp-config.php.
  2. Add the following line just before the “That’s all, stop editing!” message: set_time_limit(300);
  3. Save the file.

Step 4: Identify the “Heavy” Plugin

If this error happens frequently during normal site browsing (and not just during updates), it’s a sign that a specific plugin is inefficient.

  • Check Error Logs: View the logs in your mybox panel to see which file is triggering the timeout.
  • Deactivate and Test: If the error occurs during a specific action (like clicking “Save”), try deactivating your most resource-intensive plugins one by one to find the culprit.

Maintenance for mybox Users

While increasing the limit solves the immediate error, it is always a good idea to keep your mybox-hosted site optimized so scripts don’t need that much time:

  • Optimize Databases: Regularly clean up old revisions and “overhead” in your database.
  • Update PHP: Ensure you are running the latest stable version of PHP (e.g., 8.2 or 8.3) via your mybox panel, as newer versions process scripts significantly faster.
  • Check External APIs: If your site relies on data from other websites, a slow external server might be the hidden cause of your timeouts.

Summary

The “Maximum Execution Time” error is simply your server’s way of saying, “This is taking too long.” By increasing the max_execution_time in your mybox panel, you give your WordPress site the “breathing room” it needs to complete complex tasks successfully.

Didn't find an answer?

Our support team is here for you 24/7 – write to us and we will help you sort it out.