Every time i tried to update WordPress ,i faced this error:

Fatal error: Maximum execution time of 120 seconds exceeded in G:\wamp\www\wordpress\wp-includes\Requests\Transport\fsockopen.php on line 246

Code of line number 246 is:

$block = fread($socket, Requests::BUFFER_SIZE);

How can i solve this problem?

2 Answers 2


This issue generally occurs when php script takes more time for execution than set in php.ini file

You can resolve this issue by using two methods:

Method 1: Editing .htaccess File Manually

Put php_value max_execution_time 600 in .htaccess file 600 is the value of execution time in seconds, you can use yours value, the maximum value is better.

Method 2: You can use https://wordpress.org/plugins/wp-maximum-execution-time-exceeded/ plugin to maximise the execution tome

  • tnks,for your valuable solution. Aug 5, 2017 at 9:08

Increase the maximum execution time of PHP.

You can do that on php.ini, on .htaccess or probably you can do it in the wp-config.php file.

For mores information, visit this codex page.

  • tnks, it have solved my wordpress update problem. Aug 4, 2017 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.