4

I am trying to install woocommerce plugin to my wordpress website I get the following error message:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\apps\wordpress\htdocs\wp-admin\includes\class-wp-filesystem-direct.php on line 81.

I also installed WP Maximum Execution Time Exceeded plugin too but I am still not able to install plugin. Please help me out with this.

Alex Mulchinock
  • 2,119
  • 1
  • 18
  • 25
Dhrumit
  • 51
  • 1
  • 1
  • 2

5 Answers5

5

This question has been asked before. Here is a link to an existing Stack Overflow question that should help you:

https://stackoverflow.com/a/34813078/2316753

You need to update your PHP.ini file to tell Apache to allow PHP scripts to run longer than 30 seconds.

Alex Mulchinock
  • 2,119
  • 1
  • 18
  • 25
4

I encountered the same problem and solved it by increasing the maximum execution time to 180. Follow these steps to solve your problem:

  1. Open the Xampp control panel Click on 'config' behind 'Apache'

  2. Select 'PHP (php.ini)' from the dropdown -> A file should now open in your text editor Press ctrl+f and search for 'max_execution_time', you should fine a line which only says

    max_execution_time=30

    Change 30 to a bigger number (180 worked for me), like this:

    max_execution_time=180

  3. Save the file

  4. 'Stop' Apache server Close Xampp Restart Xampp 'Start' Apache server

  5. install woocommerce plugin again

Victoria Ruiz
  • 4,913
  • 3
  • 23
  • 40
3

This problem kept me up for hours. What solved it for me was to increase the maximum execution time (max_execution_time) in php.ini file. Here is a step-by-step procedure:

  1. Open the XAMPP control panel
  2. Click on 'config' under the 'Actions' Tab found on same line as 'Apache'
  3. Select 'PHP (php.ini)' from the dropdown
  4. In the file that opened press CTRL+F. Type 'max_execution_time' in the search box that pops up
  5. You should see this line 'max_execution_time=30' highlighted. Change 30 to a bigger number (90 should work, else use 180)
  6. Save the file
  7. 'Stop' and 'Start' Apache server
  8. Go to your WordPress Admin dashboard and refresh the page
Nate
  • 516
  • 1
  • 5
  • 14
1
  1. locate the file [XAMPP Installation Directory]\php\php.ini (e.g. C:\xampp\php\php.ini)
  2. open php.ini in Notepad or any Text editor.
  3. locate the line containing max_execution_time and increase the value from 30 to some larger number (e.g. set: max_execution_time = 90)
  4. then restart Apache web server from the XAMPP control panel
shebin c babu
  • 1,069
  • 8
  • 7
0

i believe you are getting the error because you are trying to install woocommerce via Add New in the WordPress plugins section of wp-admin and your internet connection isn't fast enough.

consider downloading your plugin's zip file next time. then unpack the zip file you downloaded for the plugin in your /wp-content/plugins folder.

then when you log into wp-admin, go to plugins and you will see the plugin listed with other plugins but unactivated. just activate it then and the plugin should work fine.

or try to get a faster internet connection. if you are a developer i will not recommend increasing the execution time in php.ini because that is an indication that your code is not optimized and any server running it will have problems when simultaneous visitor count rises. i'm just saying.

  • 1
    Internet connection speed has nothing to do with PHP execution time. This is a server-side error, not a client-side network error. – Alex Mulchinock Nov 08 '17 at 10:12
  • If WP uses file_get_contents('www.path/to/wp/module') it could result in the maximum execution time error (setting a higher max_execution_time is still the way to go though). – Felix Dec 07 '17 at 14:03