max_execution_time htaccess file
By default, the max_execution_time is usually set to 30 seconds. If your PHP scripts need more time, then you need to edit the value in the .htaccess file.
How to do it yourself:
- Open the File Manager in cPanel and click to the public_html directory.
- Double-click the .htaccess file. or right click, open edit mode
- Insert the following code into the bottom of your .htaccess file:
php_value max_execution_time 60
- Press Save and Close.
Or Editing .htaccess file
Similarly, max_execution_time can be set in the .htaccess file in the WordPress site’s back end.
WordPress uses this file to manipulate how Apache (server) serves files from its root directory and subdirectories. The file is vital and often bad edits break the website.
We add some directives at the end of the file to increase the PHP maximum execution time.
For this, we access the website’s root directory, which contains the wp-config.php file. In cPanel servers, it will be public_html. We then find the .htaccess file.
Add the following at the end of the file
php_value memory_limit 256M php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 1000
Finally, we save the changes made.
Then restart the Apache service. Or not
service apache2 restart
That solves the error with maximum execution time and another max_input, post_max_size