Fatal error: Maximum execution time of 60 seconds exceeded in H:\wamp\www\custom\wp-includes\class-wp-http-curl.php

I imported the Theme Unit Test xml file with the wordpress importer. But all of the data is imported as pages. I am following an online tutorial to build a wordpress theme development and I believe the data should be imported as posts.

When I proceed with the import. I can choose to import authors or to assign a existing author and I can choose to import/download attachments (which I did).

I get a fatal error

Fatal error: Maximum execution time of 60 seconds exceeded in H:\wamp\www\custom\wp-includes\class-wp-http-curl.php

I get a bunch of pages and media but no posts.

Although I am also increase those values:

max_execution_time = 5000

max_input_time = 5000

memory_limit = 1000M

How should I fix this so I can import all the content?

2 Answers
2

I get that answer.

I go to this file: wp-includes/deprecated.php and find this line in (deprecated) wp_get_http() function:

@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-ridding my php.ini settings. so I comment out that line, my php.ini settings will start working again.

Leave a Comment