Fatal error: Maximum execution time of 60 seconds exceeded for wp-db.php

I ma trying to import xml file to my new wordpress when i am trying to import after 1 minute i am getting the below error:

Fatal error: Maximum execution time of 60 seconds exceeded in C:wampwwwdemo6wp-includeswp-db.php on line 1811

Read More

i added below line to wp-db.php but still iam getting same error

ini_set('max_execution_time', 1900); 

and in php.ini i changed too still same error

max_execution_time

Related posts

Leave a Reply

3 comments

  1. Check all your resource limits first. You can use the PHPinfo Plugin to check the resource limits. If all the limits are appropriate follow the step below:

    Add set_time_limit(1000) in the wp-includes/class-http.php file.
    Check the below code:

    <?php
    /**
    * HTTP API: WP_Http class
    *
    * @package WordPress
    * @subpackage HTTP
    * @since 2.7.0
    */
    
    set_time_limit(1000);
    
    if ( ! class_exists( 'Requests' ) ) {
    require( ABSPATH . WPINC . '/class-requests.php' );
    
    Requests::register_autoloader();
    Requests::set_certificate_path( ABSPATH . WPINC . '/certificates/ca-bundle.crt' );
    }
    
  2. ini_set(‘max_execution_time’, 1900);

    if you want to disable this limit, set it to 0. However, this parameter may also be not alterable if server is set so (which is a case on many hostings)

  3. Go to this file: wp-includes/deprecated.php and find this:

    @set_time_limit ( 60 );

    just comment out this line and it works fine.

    Because WordPress hard coded that 60 seconds limit, this hard coded setting was over-read php.ini settings. so comment out that line, and php.ini settings will start working again.