Share
When working with a website, errors can interrupt your workflow and affect performance. One common issue in WordPress development is the “maximum execution time exceeded” error, which happens when a script takes too long to run. This problem is often seen during plugin installation, theme updates, website migration, or large file uploads.
Understanding how to manage the max execution time WordPress setting is important for maintaining a fast and stable website. By increasing this limit, you can prevent errors, improve website performance, and ensure smooth execution of tasks. Whether you are a beginner or a developer, learning how to adjust execution time using simple methods can help you fix issues quickly and keep your WordPress website running efficiently.
What is Max Execution Time in WordPress?
Max execution time in WordPress is the maximum time a PHP script is allowed to run on your server. It is usually set between 30 to 60 seconds by default. If a task takes longer than this limit, the server stops it and shows a fatal error. This can happen during large uploads, backups, or plugin installations. Increasing the max execution time helps your website complete heavy tasks without interruption. It is an important setting for smooth website performance and stability. You can change it using files like wp-config.php, .htaccess, or php.ini, depending on your hosting.
Why Does the Fatal Error Occur?
A fatal error occurs in WordPress when a process or script cannot finish properly, and the server is forced to stop it. One of the most common reasons is exceeding the max execution time WordPress limit.
This usually happens when a task takes too long to complete. For example, installing heavy plugins, uploading large files, running backups, or importing data can use more time than allowed. When the script crosses the set time limit, the server automatically stops it and shows a fatal error message.
Other reasons can include low memory limit, poor coding in themes or plugins, server issues, or slow external API responses. In simple terms, a fatal error happens when your website tries to do more work than the server allows within the given time.
Signs You Need to Increase Execution Time
If your website is slowing down or showing errors, it may be a sign that your execution time is too low. Here are some common signs to watch for:
- Website crashes during tasks: Your site stops working when installing plugins, themes, or updates.
- Timeout error messages: You see errors like “maximum execution time exceeded” on the screen.
- White screen of death: The page turns completely blank without any message.
- Backup or restore failure: Backup plugins fail to complete the process.
- Import/export issues: Large files fail to upload or download properly.
- Slow admin dashboard: The WordPress dashboard takes too long to load or respond.
- Plugin installation stuck: Plugins take too long to install or never finish.
If you notice these signs often, increasing execution time can help improve your website's performance and prevent errors.
Methods to Increase Max Execution Time in WordPress
Increasing the execution time helps your WordPress website complete heavy tasks without errors. There are different methods you can use based on your hosting and technical comfort level.
1. Edit wp-config.php File
Editing the wp-config.php file is one of the easiest and most commonly used ways to increase the max execution time WordPress. This file is located in the root directory of your WordPress installation and controls many important settings. By adding a simple line of code, you can allow your server to give more time for scripts to complete, which helps prevent fatal errors during heavy tasks like plugin installations or large imports.
- Access your website files using FTP or File Manager
- Open the wp-config.php file
- Add this line: set_time_limit(300);
- Save the file and upload it back if needed
- Refresh your website and test the changes
2. Modify the .htaccess File
The .htaccess file is used to manage server-level configurations, especially on Apache servers. Increasing execution time through this file is quick and effective. However, it only works if your hosting provider allows PHP values to be set in .htaccess. This method is helpful when you want a fast fix without editing core PHP files.
- Locate the .htaccess file in your website’s root folder
- Open it using a text editor
- Add: php_value max_execution_time 300
- Save the file and check your site
3. Update php.ini File
The php.ini file is the main configuration file for PHP settings on your server. Changing the execution time here is one of the most reliable and permanent solutions. It directly controls how long all PHP scripts can run, making it ideal for websites that frequently perform heavy operations.
- Find the php.ini file in your hosting panel or server
- Search for max_execution_time
- Change the value from 30 to 300 (or higher if needed)
- Save the file
- Restart the server if required
4. Use a WordPress Plugin

For users who are not comfortable editing code, plugins offer a simple and safe solution. These plugins automatically adjust the max execution time WordPress setting without requiring technical knowledge. It’s a great option for beginners or non-developers.
- Go to WordPress Dashboard → Plugins → Add New
- Search for plugins like “WP Maximum Execution Time Exceeded”
- Install and activate the plugin
- Configure settings if available
- Save and test your website
Conclusion
Dealing with fatal errors in WordPress can be frustrating, especially when they interrupt important tasks like updates, backups, or migrations. Fortunately, increasing the max execution time WordPress setting is a simple and effective solution in most cases.
By using methods like editing wp-config.php, .htaccess, or php.ini, you can quickly resolve timeout issues and improve your site’s performance. However, it’s equally important to optimize your website, monitor plugins, and ensure your hosting environment supports your needs.
Remember, increasing execution time is not just about fixing most common WordPress errors, it’s about creating a stable, reliable, and high-performing WordPress website. By following the steps and best practices in this guide, you can confidently handle execution time issues and keep your site running smoothly without interruptions.