0 votes
by (120 points)

1 Answer

0 votes
by (9.9k points)

Your server has default Maximum execution time set to 30 seconds. You need to modify it.

Method A: via php.ini

The path of php.ini is varied as per server environment. For example,
  • XAMPP:
    • C:\xampp\php\php.ini
    • XAMPP control panel > Apache Config > php.ini
      xampp php ini path
  • WAMP
    • C:\wamp\bin\apache\apache2.4.9\bin\php.ini
    • Right-click on WAMP shell icon (near watch) > PHP > php.ini
  • cPanel:
    • /home/username/public_html/php.ini
    • cPanel > Software > MultiPHP INI Editor

      MultiPHP INI Editor
  • Other: Just google with OS or Panel to find the path of php.ini
Now, Add or Edit php.ini and search for line max_execution_time and replace line or value as below,
max_execution_time = 300
Remember, here 300 means 300 seconds (~5 minutes). If you still encounter the error then increase this value and retry.

Method B: via .htaccess for Apache server

Locate or create the .htaccess file at the root or home directory. Such as public_html. Add or replace the line as below
<IfModule mod_php5.c>
php_value max_execution_time 300

Method C: via wp-config.php for WordPress website

Locate the folder where WordPress installed, you can see the wp-config.php file there. Search and add or replace below the line,


So these are the most common method to control execution time. Hope this will helpful to you. In case, other method work then kindly share them.

Welcome to DoubtSolver Q&A, where you can ask doubts and receive solutions from other members of the community.