Advertisement

Set PHP value max execution time for site to load faster

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
User avatar
dejansoftware
Joomla! Explorer
Joomla! Explorer
Posts: 440
Joined: Tue Jul 10, 2007 1:24 pm
Location: Banja Luka, Republic of Srpska

Set PHP value max execution time for site to load faster

Post by dejansoftware » Thu Jan 30, 2020 11:03 am

@Slackervaara suggested me to change this:
Your max execution time is 1000 seconds. I use 30 seconds and then the site was faster than with higher value. You can changes this by putting this in htaccess:
php_value max_execution_time 30
My PHP Configuration:

Version: 7.2.24 | PHP API: cgi-fcgi | Session Path Writable: Yes | Display Errors: 0 | Error Reporting: 22519 | Log Errors To: | Last Known Error: | Register Globals: | Magic Quotes: | Safe Mode: | Allow url fopen: 1 | Open Base: | Uploads: 1 | Max. Upload Size: 150M | Max. POST Size: 175M | Max. Input Time: 1000 | Max. Execution Time: 1000 | Memory Limit: 256M

I have 2 questions:
  • I don't have php_value max_execution_time in .htaccess, so where should I set it up?
  • Above is my PHP Configuration. Is there anything else in PHP configuration that needs to be changed for faster page load ?
Thanks
Dejan

Advertisement
User avatar
Slackervaara
Joomla! Ace
Joomla! Ace
Posts: 1155
Joined: Sat Aug 13, 2011 6:27 am

Re: Set PHP value max execution time for site to load faster

Post by Slackervaara » Thu Jan 30, 2020 11:40 am

I checked with my settings the main difference is Max execution time which I have 30 seconds. Most webhosts have 30 seconds. You can change the time by opening your htaccess in an editor like Notepad++. At the top add:
php_value max_execution_time 30

But be careful what you write in htaccess because an , after or a dot will give error and blank page. Save and then upload the htaccess to your site. It is possible to change such settings via htaccess.

User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10707
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Set PHP value max execution time for site to load faster

Post by AMurray » Sat Feb 01, 2020 1:39 am

Those settings are probably in the server's php.ini file, not necessarily the .htaccess file.

Your settings are well above what would be considered "the minimum" so they are fine as they are - perhaps the execution time could be 60/90/120 - whatever you preference is.

Many hosts would have a way to change PHP settings through cPanel.
Regards - A Murray
Global Support Moderator

Advertisement

Locked

Return to “Performance - Joomla! 3.x”