WordPress.org

Ready to get started?Download WordPress

Ideas

Command line tool

  1. radicaldesigns
    Member

    12345

    I think it would be great if there were a wordpress command line interface for upgrading core, plugins, and themes, and possibly doing other stuff.

    As of now, it's impossible to do upgrades on a cron job. That may or may not be a good idea, but I would like the option.

    I help manage (and keep up to date) about 60 separate wordpress sites hosted on a couple of servers. Right now we're using a custom setup involving git to update the core, but updating plugins is a nightmare, especially since there are permissions issues (we don't want all files to be owned by the web user, and we don't want to put linux login credentials in a web form). If I go run something like:

    php cli.php upgrade_all_plugins

    And have it download and upgrade all plugins (like the web interface's auto-upgrade feature), this would be amazing. Anyone else with me?

    Drupal has something similar to this called drush: http://drush.ws/

    I've briefly looked through the auto-upgrade code and it seems like a nest of authentication/view code along with the actual upgrading code, so I don't know how easy it would be to separate it so it could be DRY. But I'd be happy to help.

    Posted: 3 years ago #
  2. coolerchoice
    Member

    Interesting theory could work well

    Posted: 3 years ago #
  3. Russell Mann
    Member

    Drush is fantastic. If WP did drush... woo hooo....

    Posted: 2 years ago #
  4. andreascreten
    Member

    I have been working on a simple and pluggable command line interface. The basic work is done but we now need to start writing more commands (and implement it in plugins). Please feel free to fork and contribute!

    You can find the code on Github: https://github.com/andreascreten/wp-cli

    Posted: 2 years ago #
  5. Brade
    Member

    To me this is essential. The current WP FTP auto-update is okay, but FTP is a security hole, and sadly you need to create a different FTP user for each WP site on your server, because the script will only update the first installation of WP it sees under the FTP user's home folder. VERY clunky indeed...

    A drush utility for WP would allow you to SSH in and run the command as the appropriate user for each site and would not be subject to PHP timeouts etc. In my opinion this should be a priority for the main WP dev team...

    @andreascreten your work looks like a fantastic start. I will check it out pronto!

    Posted: 2 years ago #
  6. [Removed]

    Posted: 2 years ago #
  7. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    DavidAnderson - as your FAQ clearly states:

    WordShell is not GPL or another open-source licence because our business model is to sell copies.

    Aside from the fact that GPL compliant products are for sale all the time, they're not permitted to be advertised here. Not being a lawyer, I don't know if you need to be GPL or not, but please note I did not remove your link/copy because of that.

    Simply put, you can't advertise nonGPL related WP products here. Sorry.

    Posted: 2 years ago #
  8. Your wishes are all now granted, and under the GPL too...

    http://wordshell.net

    Update all plugins on a site:

    Wordshell mysite all --update --latest

    That's nothing.... update all plugins on all sites:

    wordshell all all --update --latest

    Update WordPress core on all sites:

    wordshell all --remotecli=coreupgrade

    Made a mistake when upgrading a plugin? New version broken? Roll-back:

    wordshell mysite akismet --rollback='2 days ago'

    Full disclosure: I am the author! Unlike WP-CLI (which looks a worthy effort), this works on FTP, SFTP and FTPS sites as well as local files (WP-CLI only does local files). So you only need to install it once, and use it everywhere. http://wordshell.net

    Posted: 2 years ago #
  9. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    David, thanks :)

    Posted: 2 years ago #
  10. Mikkel Breum
    Member

    Take a look at wp-cli http://wp-cli.org

    Posted: 9 months ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    8 Votes
  • Status

    This idea is under consideration