Overwrite wp-cli.yml file in WP toolkit
We have scripts that require to be run when WP Core updates. We noticed the file:
/usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/wp-cli.yml
Has:
skip-plugins: true
skip-themes: true
We want skip-plugins to be turned into "False" for all hosting accounts on the server. However, when editing wp-cli.yml, the file gets overwritten overnight. is there a way to permanently overwrite the skip-plugins for all hosting accounts? or should we CHMOD wp-cli.yml to prevent it from being updated?
Any suggestions or alternatives to ensure WP-Toolkit calls the plugins as it updates. Thanks
-
Hey there! You definitely don't want to chmod a file that is being overwritten as part of the cPanel updates, as that will just lead to a different set of issues. I reached out to the WPT team and they said it is specified for their own operations. If you want to use wp-cli directly, you should follow the details here to get that setup on the server, instead of using the one provided through WPT: 0 -
Hi! Unfortunately that article does not have information on overriding wp-cli.yml . the wp-cli.yml file is used by WP Toolkit on how to update sites. It seems plugin updates are disabled under WP Toolkit automatic updates: cat /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/wp-cli.yml skip-plugins: true skip-themes: true According to this Config, the wp-cli.yml is read by wp-cli by default. It does not state how to override it because the WP-CLI command is not launched from within the user working directory. If we put wp-cli.yml in public_html, it makes no difference. The issue happens because wp-cli is passing the config file parameters in the command line. It seems our only option is to prevent cPanel from overwriting /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/wp-cli.yml , I am not sure if this will break anything else! 0 -
From what I got from my conversation yesterday, they don't design that file to be overwritten. It's important to note that the auto-update of plugins is a core feature of WPT, and is really one of the main reasons it exists, as outdated plugins are one of the main security exploits in WordPress. The value in that configuration file is telling the system to skip any themes or plugins from being loaded with the command line tools, but doesn't affect the site updates. 0
Please sign in to leave a comment.
Comments
3 comments