One of the server security is setting a time limit for PHP processes so-called Maximum Execution Time. This limit allows to cancel the PHP process after reaching the assumed time by the process. Unfortunately, in the case of complicated processes triggered by some WordPress plugins or even software updates, it turns out that the limits are set too low and the processes are not finished.
If in dashboard or debug.log file you will see message, after launching an update or other like this one:
Fatal error: Maximum execution time of 5 seconds exceeded in
Don’t panic :) The problem can be frustrating, especially for less experienced WordPress users – but it is very easy to repair. Below is a way to deal with it.
1. Connect to your FTP server using FilleZilla, Total Commander or another FTP client.
You can find the .htaccess file in the root directory of your site. This is the same directory where are located wp-content and wp-admin are located.
2. After opening the file, add the following line to it:
php_value max_execution_time 300
3. Save the file and make sure that the change has been made.
The code above sets value of the maximum execution time of the PHP process for 300 seconds. If the error still appears, try to simply increase the value, e.g. up to 600.
There is no .htaccess in any directory
If you have not found the .htaccess file, it may not have been generated by your website yet.
To create a file and make change described above, go to your Settings > Permalinks in your WordPress, then click Save Changes
After saving the settings WordPress will create a .htaccess, which you can modify according to the above instructions.