Edit the wp-config.php file and add the following line before /* That’s all, stop editing! Happy blogging..:
set_time_limit ( 1000 );
Hey there!
I had the same problem and editing the wp-config.php file like Jesin said did not work for me. I did find a fix that was suggested by another forum here:
Hi
Many of us get that error usually when importing data from XML file into WordPress but wordpress times out everytime. So we usually try to fix that by increasing maximum execution time by editing php.ini file or .htaccess file or increase time limit by adding set_time_limit(0) in wp-config.php file.
But what about if above none of the Solutions works then here is the solutions
You need to edit that file wp-includes\class-http.php and then add that code just before 1512 or 1511 like below :
1511 set_time_limit (5000);
1512 curl_exec( $handle );
1513 $theHeaders = WP_Http::processHeaders( $this->headers, $url );
1514 $theBody = $this->body;
1515 $bytes_written_total = $this->bytes_written_total;
I’m a beginner with php but from what I’ve gathered adding the ‘set_time_limit’ close to where the script times out will add more time to execute everything on top of the 60 seconds or whatever the default limit is set to. I’m guessing that after everything is uploaded you can remove the line if you wanted to put everything back to normal.
Yes Lionbunny you r right.. but only add set_time_limit (execution time u want in seconds); on line 1511.
example
set_time_limit (8000);
i have same problam you found the solution of this problem