- To max_execution_time Locate the
php.inifile: This file is responsible for setting up the PHP configuration. You can ask your web hosting provider to know the location of this file. Alternatively, you can use a tool like File Manager or FTP FileZilla to access the files on your server. - Access the
php.inifile using File Manager: If your web hosting provider offers a File Manager, log in to your hosting account and navigate to the File Manager. Look for thephp.inifile, which is typically located in the root directory of your server. Right-click on the file and select “Edit” to open it in a text editor. - Access the
php.inifile using FTP FileZilla: If you prefer to use an FTP client like FileZilla, download and install it on your computer. Once installed, open FileZilla and enter your FTP credentials to connect to your server. Navigate to the root directory of your server and look for thephp.inifile. Right-click on the file and select “Edit” to open it in a text editor. - Find the
max_execution_timesetting: Search formax_execution_timein thephp.inifile. If it is not there, you can add it manually. The line should look like this:
[php]max_execution_time = 300[/php]
The value of 300 is the time in seconds that the script is allowed to run before it is terminated.
- Save and close the
php.inifile. - Access the
wp-config.phpfile: Thewp-config.phpfile contains important configuration information for your WordPress site, including database connection details. To access it, you can use File Manager or FTP FileZilla. - Access the
wp-config.phpfile using File Manager: Log in to your hosting account and navigate to the File Manager. Look for the root directory of your WordPress site, and locate thewp-config.phpfile. Right-click on the file and select “Edit” to open it in a text editor. - Access the
wp-config.phpfile using FTP FileZilla: Connect to your server using FTP FileZilla, and navigate to the root directory of your WordPress site. Look for thewp-config.phpfile and right-click on it. Select “View/Edit” to open the file in a text editor. - Add the
set_time_limitcode: Once you have opened thewp-config.phpfile in a text editor, add the following code:
[php]set_time_limit(300);[/php]
This will set the maximum execution time to 300 seconds. Add it after the line that reads:
[php]/* That’s all, stop editing! Happy blogging. */[/php]
- Save and close the
wp-config.phpfile. - Verify the change: To check if the change has taken effect, you can create a
phpinfo.phpfile in your WordPress site’s root directory with the following code:
[php]<?php phpinfo(); ?>[/php]
Visit the phpinfo.php file in your web browser and look for the max_execution_time setting. It should now display the new value that you have set.
Note: Always make a backup of any file you are editing before making any changes to avoid losing any important data.