What tools respect `.distignore`?

This is file for WP CLI. the command dist-archive: wp dist-archive . Note that you need to install both WP CLI and this plugin: wp package install wp-cli/dist-archive-command

How Can I setup WP CLI on Windows development machine running AMPPS?

Installing wp-cli through Composer is the way to go. For instance: $ cd C:\ $ composer create-project wp-cli/wp-cli –no-dev Copy the path to the bin directory inside the wp-cli directory (something along the lines of C:\wp-cli\bin) Add copied path to the Windows Path variable (tutorial) Exit all CMD’s (or git bash) and reopen them. Now … Read more

Can I create (or update) user password with WP-CLI by hash?

There is not “one command” in WordPress CLI that does the job: https://github.com/wp-cli/wp-cli/issues/2270 However using other commands, you can overide the user password directly in the database using the following: USER_ID=$(wp user list –login=”$USR_LOGIN” –format=ids) wp db query “UPDATE wp_users SET user_pass=”$HASHED_PASS” WHERE ID = $USER_ID;” First line is optional if you already know the … Read more

What’s the proper way to setup WP-CLI on Ubuntu so that I don’t have to use the flag –allow-root?

All files and folders should be owned by www-data user and group if not then WordPress can’t change files hence fails to update from dashboard. wp-cli says to use sudo -u www-data -i — wp <command> but that gives This account is currently not available. Why? See this answer: https://askubuntu.com/a/486661/695240 You’re getting the This account … Read more

Can wp-cli display all users and their roles across all sites in a multisite instance?

List all the admins of each site Side note: Dividing these up by site would also be handy. Let’s do that here: We can list the url of each site with: wp site list –field=url We can list all administrators of a given site with: wp user list –role=administrator –url=https://example.tld/site1 These commands can be combined … Read more