If a page on your website shows something like "Fatal error: Maximum execution time of 30 seconds exceeded", it means a PHP script tried to run longer than the server's PHP time limit allows and was stopped automatically. This usually happens during heavy tasks like importing a large database, running a bulky plugin update, or generating a big report, not because your website is broken.
The fix is to raise the max_execution_time value in your PHP settings. How you do that depends on whether your account runs on cPanel or DirectAdmin.
What causes this error
Every hosting account has a default PHP time limit (commonly 30 seconds) to stop a single script from tying up server resources indefinitely. A script that legitimately needs more time, such as a WordPress import, a large file upload processed by a plugin, or a scheduled task, will hit this ceiling and stop partway through.
This is different from a 504 Gateway Timeout error, which happens at the web server level rather than inside a PHP script. If raising max_execution_time doesn't help, that guide may be the better fix.
In cPanel
- Log in to cPanel and go to the Software section.
- Click MultiPHP INI Editor.
- Select your domain from the dropdown, or switch to Editor Mode to edit the raw values.
- Find the max_execution_time field and change it to a higher value, such as 300 (5 minutes).
- Click Apply to save.
If your account doesn't show MultiPHP INI Editor, go to Select PHP Version instead, click Options, and edit max_execution_time from there.
In DirectAdmin
- Log in to DirectAdmin and open PHP Selector (sometimes listed as Select PHP Version under Extra Features).
- Switch to the custom PHP configuration tab, usually labeled PHP Options or similar.
- Locate max_execution_time and raise its value, for example to 300.
- Click Save and give it a minute to take effect.
If you don't see this option, an alternative is to create or edit a php.ini file in your domain's public folder through File Manager and add the line max_execution_time = 300. Some accounts need custom php.ini support enabled first, so contact ZIPROF support if the option isn't visible.
A few things to keep in mind
- Set the value only as high as you actually need. An extremely long limit can let one runaway script hold resources for a long time.
- Some tasks, like importing a very large database, are better handled through a method built for large files rather than by raising this limit indefinitely.
- Shared hosting plans usually have an upper cap on how high this value can go. If you need more than the cap allows, reach out to ZIPROF support.
Once you've raised the limit, reload the page or re-run the task that failed. If the error shows immediately rather than after a delay, the cause may be something else, such as the 504 error linked above.