- Forums ›
- Software Programming Tutorials ›
- WordPress ›
- How to Fix WP Maximum Execution Time Fatal Error?
PHP has come with many useful functions which also include
bool set_time_limit ( int $seconds ). This php function allows you to define time (in seconds) which you will give to a script which is under execution. This function will return fatal error message if script has not been executed in given time frame. By default this function has a limit of 30 seconds but you can also increase or decrease time you want to give to a particular script. In addition to this function, there is also another PHP function which can be used to set maximum execution time for a script and it is max_execution_time.
Most often while using WordPress open source, you will have experience Fatal Error: Maximum Execution Limit Exceeded. This fatal error will come up on different occasions:
1: While you are installing WordPress
2: While you are importing a WordPress Database.
3: While you are uploading a WordPress theme.
4: While you are trying to upload a Plugin.
5: While you have tried to execute a suspicious script in WordPress
What is this Maximum Execution Time Fatal Error?
Like I have already stated that each script is given a targeted time to be completed by PHP, if specific script has not completed itself in given time frame this Fatal Error will appear. If maximum execution time is not set for the scripts, suspicious scripts will put a load on server and server can go down.
How to Fix WP Maximum Execution Time Fatal Error?
There are three ways you can fix maximum execution time fatal error. You can try each method whatever works best for you:
1: Edit PHP.INI
If your hosting provider is giving you access for php.ini, open php.ini file in Notepad or Dreamweaver and place following piece of code in it:
max_execution_time = 60 // While 60 are number of seconds
If you are using local server like XAMPP just find php.ini file and place above stated code in it. If you do not have access to php.ini file, you can talk to your hosting provider.
2: Edit .HTACCESS
You can also increase maximum execution time via .htaccess file. Download your .htaccess file from cpanel (WP root directory), open it in Notepad or Dreamweaver or in any other code editor and place following piece of code in it:
php_value max_execution_time 60 // While 60 are number of seconds
3: Use a Plugin
Wordpress inventory is full of different beneficial plugins which can be used for different tasks. To increase maximum execution time you can download a ready made plugin like WP Maximum Execution Time Exceeded which will work like a charm to fix your maximum execution time fatal error. This useful plugin will automatically add maximum execution time in .htaccess file for you. Do not forget to read instructions for using this plugin.
The topic ‘How to Fix WP Maximum Execution Time Fatal Error?’ is closed to new replies.