Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a for loop based WP-CLI command to update all sites under document root at once #39

Closed
ghost opened this issue Apr 5, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Apr 5, 2017

I suggest adding a new command that can be added anywhere in the system which updates all websites in a total way. As for now I do:

for dir in /var/www/html/*/; do cd "$dir" && wp plugin update --all && wp core update ; done

I don't have any problem but people who are very new to linux and just getting used to it might not feel comfortable working with such a long command so I offer 2 things:

  • Making a WP-CLI shorter syntax command that does the same thing.
  • Making sure the new "total update command" will also update themes.
@danielbachhuber
Copy link
Member

For finding WordPress installs on the filesystem, you might want to check out https://github.com/wp-cli/find-command

Generally, I lean more towards helping users learn more about existing CLI tools, than replicating those tools in WP-CLI. See our "Shell friends" doc on this topic: https://make.wordpress.org/cli/handbook/shell-friends/

Do you have any suggestions on how we could improve our documentation, etc.?

Making sure the new "total update command" will also update themes.

Related #16

@ghost
Copy link
Author

ghost commented Apr 6, 2017

Do you have any suggestions on how we could improve our documentation, etc.?

I would add a note in the "commands" section regarding to automizing update of plugins and core, when a user has 2 or more sites. That's what I personally looked for in the command section at the time.

@viktorbijlenga
Copy link

A regular bash alias would maybe be a good idea to make this easier.
https://bash.cyberciti.biz/guide/Create_and_use_aliases

@ghost
Copy link
Author

ghost commented Apr 6, 2017

Of course I can create a Bash alias, but new users not necessarily can create Bash aliases or understand the command above, hence, My point is that we should make this more accessible to new users via a WP-CLI command. This is something worth considering I think.

@viktorbijlenga
Copy link

This could be done through great documentation I think instead.

@danielbachhuber
Copy link
Member

Documentation is the best place for this. I've created a new issue for it: wp-cli/handbook#175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants