WordPress plugin installation error

I have installed WordPress 3.8 and now I am trying to install WooCommerce - excelling eCommerce 2.0.20 plugin but every time I am getting this error:

Note: I am trying to install plugin in local machine.

Fatal error: Maximum execution time of 60 seconds exceeded in M:\XAMPP\htdocs\woocommerce\wp-includes\class-http.php on line 1327

I have tried with bellow code:

  1. php.ini (in wp-admin folder)

    memory_limit = 32M
    upload_max_filesize = 100M
    upload_max_filesize = 100M
    post_max_size = 32M
    file_uploads = On

  2. wp-config.php

    set_time_limit(60);

but still I am facing this error. I know this very common issue but I need your help to solve this issue.

I will appreciate If you help me 🙂

Thanks

Solutions Collecting From Web of "WordPress plugin installation error"

I had the same problem but it occured while importing the theme-unit-test-data.xml along with its attachments. I am using WP 3.8.1. It’s a WordPress issue so editing the php.ini has no effect. WP uses a hardcoded value (60 secs) for http_request_timeout of WP_Http in class-http.php.

To solve it, place this code in functions.php of your currently active theme:

add_filter( 'http_request_timeout', 'mytheme_bump_request_timeout', 100 );
function mytheme_bump_request_timeout(){
    return 300; //Change this to your desired timeout value in ms
}

Edit php.ini

Should be located at xampp/php/php.ini

Find this line:

max_execution_time

Change its value to 300

max_execution_time = 300

Here 300 means 5 minutes of execution time for the http request.