Title: max_execution_time = -1
Last modified: June 6, 2021

---

# max_execution_time = -1

 *  Resolved [jintsai](https://wordpress.org/support/users/jintsai/)
 * (@jintsai)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/max_execution_time-1/)
 * Hi, we are using the plugin Custom PHP Settings. We input max_execution_time=
   300, but the value doesn’t change. Below is a screenshot for your reference: 
   [https://ibb.co/jzG94K7](https://ibb.co/jzG94K7)
 * Can you kindly help us and why is the value not changed? Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [cyclonecode](https://wordpress.org/support/users/cyclonecode/)
 * (@cyclonecode)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/max_execution_time-1/#post-14525821)
 * Hello
 * Can you verify that you .htaccess file is being updated as it should e.g you 
   should have a section in this file looking something like this:
 *     ```
       # BEGIN CUSTOM PHP SETTINGS
       php_value max_execution_time 300
       # END CUSTOM PHP SETTINGS
       ```
   
 * Looking on you screenshot it seems like the changes doesn’t take effect. Perhaps
   you have some other override for `max_execution_time` for instance in you `wp-
   config.php` file?
 * The max_execution_time can be changed by doing
 * `set_time_limit(-1);`
 * So I am thinking perhaps that this is done in you wp-config.php file or perhaps
   by some other plugin?
 *  Thread Starter [jintsai](https://wordpress.org/support/users/jintsai/)
 * (@jintsai)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/max_execution_time-1/#post-14525900)
 * Hi, we didn’t see the #Begin custom Php Setting: [https://ibb.co/K7LppSR](https://ibb.co/K7LppSR).
   At the same time, we don’t see any code related to max_execution_time or set_time_limit(-
   1) in wp-config.php.
 * Can you kindly let us how do we find out and replace the setting of the max_execution_time
   or set_time_limit(-1) ? Many thanks!
 *  Plugin Author [cyclonecode](https://wordpress.org/support/users/cyclonecode/)
 * (@cyclonecode)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/max_execution_time-1/#post-14525916)
 * When you click “Save settings” in the editor do you get a notification box at
   the top of the page with a message like “Settings updated and stored in /usr/
   local/var/www/wp/.htaccess.”?
 * It would also be good if you could tell me which version of Custom PHP Settings
   you are currently using and also copy the information from the status page located
   at:
 * wp-admin/tools.php?page=custom-php-settings&tab=status
 *  Thread Starter [jintsai](https://wordpress.org/support/users/jintsai/)
 * (@jintsai)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/max_execution_time-1/#post-14525941)
 * Hi, after clicking “save setting”, I don’t have any notification on the top.
 * The version of the custom PHP setting is 1.4.1
 * The status is below:
 *     ```
       {
           "notes": {
               "review": {
                   "id": 1,
                   "weight": 1,
                   "persistent": false,
                   "time": 1623014957,
                   "type": "info",
                   "name": "review",
                   "callback": "addReviewNotice",
                   "dismissed": true,
                   "dismissible": true
               },
               "support": {
                   "id": 2,
                   "weight": 2,
                   "persistent": true,
                   "time": 1623014960,
                   "type": "warning",
                   "name": "support",
                   "callback": "addSupportNotice",
                   "dismissed": true,
                   "dismissible": false
               }
           },
           "php_settings": [
               "max_execution_time=300"
           ],
           "restore_config": true,
           "trim_comments": true,
           "trim_whitespaces": true,
           "update_config": null,
           "version": "1.4.1"
       }
   
       === PHP ===
       System name = Linux teemo.dhn.cl 3.10.0-962.3.2.lve1.5.25.6.el7.x86_64 #1 SMP Thu Apr 18 06:40:26 EDT 2019 x86_64
       Architecture = x64
       PHP Version = 7.4.19
       Debug build = no
       Zend Engine version = 3.4.0
       Server Api = cgi-fcgi
       Configuration File (php.ini) Path = /opt/cpanel/ea-php74/root/etc
       Extension directory = /opt/cpanel/ea-php74/root/usr/lib64/php/modules
       Loaded configuration file = /opt/cpanel/ea-php74/root/etc/php.ini
       Additional configuration files = /opt/cpanel/ea-php74/root/etc/php.d/01-ioncube.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-bcmath.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-calendar.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-ctype.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-curl.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-dom.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-exif.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-fileinfo.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-ftp.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-gd.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-iconv.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-imap.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-intl.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-json.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-mbstring.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-mysqlnd.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-pdo.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-phar.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-posix.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-simplexml.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-soap.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-sockets.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-sqlite3.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-tokenizer.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-xml.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-xmlwriter.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-xsl.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/20-zip.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/30-mysqli.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/30-pdo_mysql.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/30-pdo_sqlite.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/30-xmlreader.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/30-xmlrpc.ini,
       /opt/cpanel/ea-php74/root/etc/php.d/zzzzzzz-pecl.ini
   
       Include path = .:/opt/cpanel/ea-php74/root/usr/share/pear
       User INI file = .user.ini
       User INI file cache TTL = 300
       Thread Safety = disabled
       IPv6 Support = enabled
       PHP Streams = https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
       Stream Socket Transports = tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
       Stream Filters = zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*
       GC enabled = enabled
   
       === WordPress ===
       Version = 5.7.2
       Multisite = no
       Site address = https://ecatalog.aimvast.com
       Debug mode = no
       Memory limit = 40M
       Cron = yes
       Language = en_US
   
       === Configuration File ===
       Path = /home/aimvastc/public_html/ecatalog/.user.ini
       Readable = yes
       Writeable = yes
       ```
   
 *  Plugin Author [cyclonecode](https://wordpress.org/support/users/cyclonecode/)
 * (@cyclonecode)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/max_execution_time-1/#post-14526040)
 * Check if this file is updated:
 * /home/aimvastc/public_html/ecatalog/.user.ini
 * You can also try to ask your hosting provider if you are allowed to override 
   PHP ini directives.
 * You could also try to just add a set_time_limit(300); in you wp-config.php and
   see if this has any effect.
 *  Thread Starter [jintsai](https://wordpress.org/support/users/jintsai/)
 * (@jintsai)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/max_execution_time-1/#post-14526046)
 * Hi, Yes, the file of /home/aimvastc/public_html/ecatalog/.user.ini is updated:
   [https://ibb.co/ydgtk9g](https://ibb.co/ydgtk9g)
 * But the setting from Current PHP Settings is still showing -1.
 *  Plugin Author [cyclonecode](https://wordpress.org/support/users/cyclonecode/)
 * (@cyclonecode)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/max_execution_time-1/#post-14526721)
 * Try adding some other setting like memory_limit=128M or similar and see if this
   works. If you add some other setting and it works as it should, then most probably
   the max_execution_time is set to (-1) somewhere else, perhaps in another plugin?
   
   Also, the -1 means that there is not limit for the execution time at all.
 * You can also join my slack channel and I might be able to help you more with 
   this:
    [slack](https://join.slack.com/t/cyclonecode/shared_invite/zt-6bdtbdab-n9QaMLM~exHP19zFDPN~AQ)
 *  Plugin Author [cyclonecode](https://wordpress.org/support/users/cyclonecode/)
 * (@cyclonecode)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/max_execution_time-1/#post-14781660)
 * It turned out that this issue was related to a bug in another plugin which always
   set max_execution_time to -1.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘max_execution_time = -1’ is closed to new replies.

 * ![](https://ps.w.org/custom-php-settings/assets/icon-256x256.png?rev=2053893)
 * [Custom PHP Settings](https://wordpress.org/plugins/custom-php-settings/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-php-settings/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-php-settings/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-php-settings/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-php-settings/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-php-settings/reviews/)

## Tags

 * [max_execution_time](https://wordpress.org/support/topic-tag/max_execution_time/)

 * 8 replies
 * 2 participants
 * Last reply from: [cyclonecode](https://wordpress.org/support/users/cyclonecode/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/max_execution_time-1/#post-14781660)
 * Status: resolved