Fatal Error: Maximum execution time of 30 seconds exceeded in D:\xampp\htdocs\WP-Project\wp-includes\class-http.php on line 325

You may have seen this error saying “Maximum execution time of 30 seconds exceeded” or “Maximum execution time of 300 seconds exceeded”. This error can be frustrating for a beginner, but fix to this fatal error is really simple and quick. Here, you will get to know different ways to fix “Fatal Error: Maximum execution time of 30 seconds exceeded”.

The max execution time fatal error in wordpress actually means that a process is taking longer time to complete and it is timing out because of less execution time.


max_execution_time of 30 seconds is the default timeout, if not configured specifically

Why Maximum Execution Time of 30 Seconds Exceeded Error?

As you know WordPress is coded in PHP Programming Language. For security purposes, to protect web servers from abuse, there is a time limit set for how long a PHP Script can run. You can find out differences in execution time limit for different web hosting. Some web hosting providers set this time limit to a higher value and some others set this to a lower value. But when any PHP Script reaches the maximum execution limit, then it results into this Fatal error: Maximum execution time of 30 seconds exceeded.

Ways To Fix Maximum Execution Time Exceeded Error

There are 4 ways to fix this fatal error. In first three ways, you can edit some files and get higher value set for max execution time limit. Fourth way is to fix this using a WordPress plugin.

Method 1: Editing file wp-config.php

You can find out wp-config.php file easily in your site root folder. Open it up for editing and add following code to the file to fix the fatal error by increasing max_execution_time wordpress.


Above code will set the max_execution_time to 300 seconds. Now just save the file and run your PHP Script again which failed due to this fatal error.

Method 2: Editing file .htaccess

You can find out .htaccess file easily in your site’s root folder. Root folder is the same in which your wp-admin and wp-content folders are located. Open .htaccess file for editing and add following code to the file.

php_value max_execution_time 300

The above code will set the maximum execution time to 300 seconds. If you still get an error while running your script, just try changing the value from 300 to 600.

Method 3: Editing file php.ini

This hack is best to change php max_execution_time for local servers where you can find out php.ini file in xampp/php folder. If you want this to be done on your web server, try finding this file by un-hiding hidden files or contact your hosting provider for this error to be fixed. If file found, Open php.ini file for editing and find php max_execution_time using Find Dialog Box. Then, increase maximum execution time from 30 to 300.

max_execution_time = 300

The above code will set the php maximum execution time to 300 seconds for all the projects you are having on your local server or web server.

Method 4: Using A WordPress Plugin

If you don’t want to edit above discussed files – wp-config.php, .htaccess, php.ini or if you are unable to find these files, try fixing the error using a plugin

After installing, That’s all, nothing to do. Plugin will fix the fatal error for you and get the maximum execution time increased.

Hope the above fixes have helped you fix the Fatal error: Maximum execution time of 30 seconds exceeded. If you find out some other issues or errors, try describing it in comments and get quick reply to fix.


Please enter your comment!
Please enter your name here