How to fix "Fatal error: Maximum execution time of 30 seconds exceeded" [duplicate]
This question already has an answer here:
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.
marked as duplicate by LoicTheAztec, Jason Aller, divibisan, knittl php Users with the php badge can single-handedly close php questions as duplicates and reopen them as needed. Aug 30 ’18 at 21:38
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
This question has been asked before. Here is a link to an existing Stack Overflow question that should help you:
You need to update your PHP.ini file to tell Apache to allow PHP scripts to run longer than 30 seconds.
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:
- Open the XAMPP control panel
- Click on ‘config‘ under the ‘Actions‘ Tab found on same line as ‘Apache‘
- Select ‘PHP (php.ini)‘ from the dropdown
- In the file that opened press CTRL+F. Type ‘max_execution_time‘ in the search box that pops up
- You should see this line ‘max_execution_time=30‘ highlighted. Change 30 to a bigger number (90 should work, else use 180)
- Save the file
- ‘Stop‘ and ‘Start‘ Apache server
- Go to your WordPress Admin dashboard and refresh the page
I encountered the same problem and solved it by increasing the maximum execution time to 180. Follow these steps to solve your problem:
Open the Xampp control panel Click on ‘config’ behind ‘Apache’
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
Change 30 to a bigger number (180 worked for me), like this:
‘Stop’ Apache server Close Xampp Restart Xampp ‘Start’ Apache server
install woocommerce plugin again
- locate the file [XAMPP Installation Directory]\php\php.ini (e.g. C:\xampp\php\php.ini)
- open php.ini in Notepad or any Text editor.
- locate the line containing max_execution_time and increase the value from 30 to some larger number (e.g. set: max_execution_time = 90)
- then restart Apache web server from the XAMPP control panel
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.