Trouble with setting PHP time limit for Wordpress

kenv2020

New member
Joined
Jun 22, 2020
Messages
2
Hi,

I am new and I hope I post this to the correct forum.

I installed a Wordpress theme called The7 theme, which can import built-in demo websites. Before I can import the demo websites, there are two or three settings that I need to set correctly. One of them is PHP Time Limit that I need to increase the setting to 300. Obviously I did a search on Google to find out how to do that but no matter what I did and how many times I tried, I wasn't able to change the setting. Two of the articles that teach one to change the setting is at https://wpastra.com/docs/increase-php-time-limit-wordpress-sites/ and https://thimpress.com/knowledge-base/how-to-increase-maximum-execution-time-for-wordpress-site/ in which they teach three different ways one can change the setting.

I tried to edit wp-config.php and it didn't work. I tried to edit .htaccess file and it didn't work either. I wasn't able to find the file php.ini, though. The editing of the .htaccess file is the most risky as any wrong character in it will mean that the website goes down and I can't access the Wordpress backend panel. Let's go with the .htaccess way, though. This is what I see in the .htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

I am supposed to add either php_value max_execution_time 300 or max_execution 300 as one of the lines in the file but it was not accepted.

The following are how it would appear in the file after I added the line:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
php_value max_execution_time 300
# END WordPress

or

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
max_execution 300
# END WordPress


However, both these two edits were not accepted. I even used the Wordpress plugin called Htaccess Editor – Safely Edit Htaccess File but I wasn't successful either.

Can someone please tell me what I can do get the PHP Time Limit setting changed or how to edit the .htaccess file so that it would accept the setting?

Thank you.
 
The easiest way from GUI would be DA pre-release, as it includes PHP settings editor.
 
Hi, I am not sure what you mean. DirectAdmin (instead of CPanel) is offered by my webhosting provider, Webhosting1st.com. How would DirectAdmin pre-release be relevant to my problem?


The easiest way from GUI would be DA pre-release, as it includes PHP settings editor.
 
I guess that means you are not the administrator and have limited access. You will have to get your host involved.
 
Back
Top