How to increase Maximum Execution Time in WordPress from 30 seconds to 300

By default maximum execution time in WordPress is set to 30 seconds but it needs to be changed with WordPress and with the installation of plugins in WordPress with lot of php scripts will be executed and you need to increase maximum execution time in WordPress from 30 seconds to 600 seconds or any as per your WordPress website requirements and this can be done in different ways on you WordPress website using php dot ini file or WordPress config file or by using a simple function in functions.php file, so let’s see how maximum execution time in WordPress in detail below:

increase maximum execution time in wordpress

If you don’t increase maximum execution time in WordPress then it will trigger fatal error on your WordPress website and recommends to increase maximum execution time. Once you increase maximum execution time you will get rid of this fatal error maximum execution time exceeded in WordPress.

Increase Maximum execution time in WordPress PHP file

8increase maximum execution time in wordpress

Using Htaccess to increase Maximum Execution Time in WordPress

Step 1: Connect to your server using FTP

Step 2: Download htaccess file to your local computer from server.

Note: By Default htaccess file is hidden (Make sure you are viewing hidden files)

Step 3: Add this code in your htaccess file at the end after ifmodule: php_value max_execution_time 300 which sets the value from 5 minutes ( You can increase this value from 300 to any as per your WordPress website requirement).

Step 4: Once you add the code to increase Maximum Execution Time in WordPress just save the file.

Step 5: Go ahead and upload the same file using ftp server.

That’s it this is how you increase Maximum Execution Time in WordPress from 30 seconds which is default to 5 minutes and now your website should be up and running smoothly without any error.

Editing PHP.ini file increase Maximum Execution Time in WordPress

You can contact your hosting team to increase Maximum Execution Time in WordPress for you, php.ini on your WordPress server is managed by hosting and you can’t edit this file by your own as for security reasons and this should be changed by hosting teams only to avoid conflicts.

If you have access to open php.ini file on server, just go ahead and edit php.ini

Step 1: Open php.ini and click on edit and view

Step 2: In php.ini file search for max_execution_time.

Step 3: Now In php.ini file change max_execeution_time=30 to max_execution_time=300

Step 4: Save php.ini file.

Step 5: Restart php on your server.

That’s it this is how you change or increase Maximum Execution Time in WordPress using php.ini file on your server.

Using wp-config file to Increase Maximum Execution Time in WordPress

Step 1: Connect to your server using ftp

Step 2: Go to your root folder and find wp-config.php file and download this file on your computer.

Note: Make sure you take backup before editing wp-config.php

Step 3: Now add this following code in your wp-config.php : ini_set(‘max_execution_time’, ‘300’); //300 seconds = 5 minutes and save file.

Step 4: Save the file and upload it on your server.

That’s it now your maximum execution time on your WordPress website is now increased from default 30 to 300 seconds which is 5 minutes and you will not any fatal errors on your website.

User.ini file to Increase Maximum Execution Time in WordPress

You can also Increase Maximum Execution Time in WordPress from default 30 to 300 by creating a new .ini file on your root folder and add the code below.

Step 1: Connect to your web server using ftp details

Step 2: In your root folder, create a new file user.ini

Step 3: Now add this code on user.ini : max_execution_time = 300; and save the file.

Step 4: Now your WordPress execution time is increased to 300 and you can change value from 300 to any as required.

That’s it this is how you to Increase Maximum Execution Time in WordPress using user.ini file in root folder.

How to Check Maximum Execution Time in WordPress is Increased or Not?

Once you have increased max execution time you can confirm max execution is increased on not by visiting WordPress dashboard and navigate to tools section and visit server information to check Increase Maximum Execution Time in WordPress is increased on it. This will work.

Why to Increase Maximum Execution Time in WordPress from default 30?

If you are using plugins or WordPress themes, maximum execution in WordPress in php.ini file is set to 30 seconds and when you are trying to install a theme and it exceeds max_execution time which is 30 seconds then WordPress will trigger fatal error and resulting in installation failed or theme installation failed or plugin installation failed, to get rid of this error you need to Increase Maximum Execution Time in WordPress.

What is Default Maximum Execution time in WordPress?

Default maximum execution time is 30 seconds and you can increase this as per your WordPress website requirement by several methods.

How to Increase Maximum Execution Time in WordPress?

You can increase in 3 ways by editing and adding maximum execution limit set to 300 in htaccess, wp-config file or creating a new file user.ini in WordPress.

How to change Maximum execution time from 30 to 5 minutes in WordPress?

Increase Maximum Execution Time in WordPress by setting the limit of max_execution_time=300 from max_execution_time=30.

Swathi
Swathi
  • Swathi is Content Writer, Author Editorial Team Member at A Savvy Web and She writes about technology troubleshooting guides and helps users to solve issues easily. She has expertise in this area for more than 2+ years of experience.
  •  She completed her Post Graduation and has an interest in Computers, Windows, Mac, Android, iPhone, Smart tv.

- Advertisement -