- To max_execution_time Locate the
php.ini
file: 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.ini
file 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.ini
file, 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.ini
file 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.ini
file. Right-click on the file and select “Edit” to open it in a text editor. - Find the
max_execution_time
setting: Search formax_execution_time
in thephp.ini
file. 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.ini
file. - Access the
wp-config.php
file: Thewp-config.php
file 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.php
file 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.php
file. Right-click on the file and select “Edit” to open it in a text editor. - Access the
wp-config.php
file using FTP FileZilla: Connect to your server using FTP FileZilla, and navigate to the root directory of your WordPress site. Look for thewp-config.php
file and right-click on it. Select “View/Edit” to open the file in a text editor. - Add the
set_time_limit
code: Once you have opened thewp-config.php
file 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.php
file. - Verify the change: To check if the change has taken effect, you can create a
phpinfo.php
file 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.