If you have a WordPress install that is giving you this error:
Fatal error: Maximum execution time of 30 seconds exceeded in ...\wp-db.php on line ####
…It’s because PHP is timing out. The default timeout in PHP is 30 seconds, see here for details.
The fix:
The method I use for this is simple:
- Open your wp-config.php file in an editor (notepad, etc).
- Add this line to the top:Â set_time_limit(300);
The “300” can be any about of time (it’s seconds) you’d like.
The top of your file should like something like this:
PS: You should only need to change this if you’re working on some kind of import /export or a one time process. If your blog requires this to run normally, their might be bad code or a server issue.