Symptoms
The 'wp-toolkit' command-line utility can be used to set wp-cli options. However, attempting to change the timeout for this results in an error that the value is read-only:
wp-toolkit --config -operation set -option-name wpCliTimeoutRegularEnabled -option-value false
Unable to set read-only configuration option "wpCliTimeoutRegularEnabled"
Description
There are several options, such as wpCliTimeoutRegular, which will be read-only when trying to use the wp-toolkit CLI utility to set them.
Workaround
To adjust timeouts, you will need to create a /usr/local/cpanel/3rdparty/wp-toolkit/var/etc/config.ini file and add needed options with desired values there:
For example:
[root@server ~]# cat /usr/local/cpanel/3rdparty/wp-toolkit/var/etc/config.ini
wpCliTimeoutHeavy = 3000
wpCliTimeoutMedium = 3001
wpCliTimeoutRegular = 3002
wpCliTimeoutMaintenanceTimeout = 3003
You can then use the utility to read values and verify that the change took place:
[root@server ~]# wp-toolkit --config -operation list | egrep "wpCliTimeoutHeavy|wpCliTimeoutMedium|wpCliTimeoutRegular|wpCliTimeoutMaintenanceTimeout"
wpCliTimeoutRegularEnabled true
wpCliTimeoutRegular 60
wpCliTimeoutMedium 300
wpCliTimeoutHeavy 1800
wpCliTimeoutMaintenanceTimeout 60