What is `wp-cli.yml` for in the public_html folder?

It is used by wp-cli, the command line interface for WordPress.
The wp-cli.yml is where you set configuration values, related to your website, for wp-cli.php to use.
https://make.wordpress.org/cli/handbook/config/

For example, to update "pretty links" from the command line (wp rewrite flush), the wp-cli.yml (or a config.yml) file is necessary for the command to work properly.
From the docs:

wp rewrite flush flushes rewrite rules.
Resets WordPress’ rewrite rules based on registered post types, etc.
To regenerate a .htaccess file with WP-CLI, you’ll need to add the mod_rewrite module to your wp-cli.yml or config.yml.
For example:
apache_modules: - mod_rewrite

Flushing and Re-saving permalinks is often needed when changing themes, or if you change the installation folder for your WordPress files.


It’s a file that your hosting company is using to help them manage the availability of and updates to the WordPress Command Line Interface. It’s supposed to be there, don’t mess with it.