Show
This is how to increase your PHP max time limit and max input vars with Bluehost. I am sure that the process is very similar with other hosting platforms.
I hope you enjoyed this short tutorial, if you like this content and want to see more on your feed – subscribe to my channel Puzzles Pro Tips on YouTube. Thanks. PHP is server side scripting language which is the backbone of WordPress websites. WordPress core, themes and plugins contain PHP files that help you to get content from the database and assemble the page layout. However, the entire process of running any PHP script is to be completed within a limited time (generally in seconds). In order to control the script running time, PHP has a variable called max_execution_time. It is essential to setup this parameter to desired value to protect your server and allocate the server resources to real users visiting the site instead of running a poorly written script in the background. WordPress SEO: Optimize WordPress site with free WordPress SEO guide. Why Execution Time is Limited?On most hosting servers, the default execution time is set as 30 seconds. However, some shared hosting companies may restrict to lower values. There are good reasons for restricting the maximum PHP execution time on WordPress.
Restricting maximum PHP execution time in server can help to stop these scripts running too long and affects real users on the site. Why You May Need to Increase?Though there are good reasons to limit PHP execution time on WordPress sites, there are also reasons why you should increase the limit.
How to View Max Execution Time?Some hosting companies like Bluehost and SiteGround offers PHP Manager app in your account. You can use this app to find the max_execution_time setup for your site. For example, follow the below instructions in SiteGround hosting.
On Bluehost hosting, you can use MultiPHP INI Editor app to find the max execution time value. If you are not able to find the default value, the best option is to ask your host to check for you. How to Increase PHP max_execution_time in WordPress?If you are receiving error like timeout, you can increase PHP max_execution_time to resolve the issue. You can do that using one of the following methods:
For first three options, you have to edit configuration files using File Manager app from your hosting account. Alternatively, you can use FTP to access your site remotely and modify the file’s content. Important: It is a good idea to backup the original files before you editing. 1. Increase PHP Execution Time with wp-config.phpGo to your WordPress root installation and find wp-config.php file. Below is an example screenshot of locating the file from File Manager app. Instead of File Manager, you can also use FTP account to modify wp-config.php file. Add the below line before it says /* That’s all, stop editing! Happy blogging. */. 100 in this example indicates the maximum execution time of 100 seconds, you can change to any desired value for your need.
It should look like below: Change PHP Max Execution Time in WP Config File2. Increase PHP Execution Time with htaccessInstead of editing wp-config file, you can add the below directive in htaccess file on your server root.
Note: .htaccess file is hidden by default. You have to enable viewing hidden files in FTP client to view this file. In most cases, File Manager will show all files without hiding. 3. Increase PHP Execution Time with php.iniThe last and preferred option is to use php.ini file.
4. Using Custom Server AppsThis option is available only on certain hosting companies like Bluehost. We explain here with Bluehost, you have to confirm the availability of this type of apps with your hosting company.
Risks in Increasing Execution TimeSetting the value too high like 1000 seconds may potentially damage your server if there is a script running for such a long time. In addition, hackers or malicious scripts can run long time without termination affecting your site’s performance on the frontend. In order to protect the server, many hosts do not allow you to modify max_execution_time value more than the allowed limit. Even you define the values using one of the above methods, it may not work if your host does not allow. The best option is to consult with your host and ask for help if you are struck with errors like update failed due to timeout. How do I increase PHP max input variables in Bluehost?Using an FTP Client. Connect to the server with your FTP client. ... . Navigate to the public_html folder.. Download the php. ... . Open the file with any text editor.. Search for memory_limit without the quotes.. Enter the new memory limit for your PHP applications.. Save the file.. Upload the file using your FTP client.. How do I increase max upload size in Bluehost?Editing upload_max_filesize and post_max_size. Login to your Bluehost Control Panel.. Open the File Manager and select to go to the Web Root and click Go.. Then scroll in the right-hand panel to the file php. ... . In the pop-up menu select Code Edit.. Click Edit at the bottom of the pop-up for Character set selection.. What is the maximum PHP memory limit?Increasing the PHP memory limit
The default memory limit is 256M and this is usually more than sufficient for most needs. If you need to raise this limit, you must create a phprc file.
|