Deploy theme and plugins through composer

Hello,

In order to gain time on deployment and maintenance, I was seeking for a way to deploy a WP website through composer and GIT, using Envato API.
I know it’s possible to deploy theme or plugins through an envato plugin, but I would like to avoid any admin connexion anytime I have to update websites.

Thanks in advance.

  1. List item

To deploy a wp website through the command line (which I think is what you’re looking to do_, you should check out the WP-CLI (http://wp-cli.org/). This is also a great tool for scaffolding themes and plugins for development.

Thanks cwpdev. I wasn’t aware about WP-CLI
It could answer to me, but not for what I really want.

Using Composer would be great in order to have a very small git repository and some configs files.

For example, with my actual configuration, I just need a composer.json with all plugins and themes I use

{
  "repositories": [
    {
      "type": "composer",
      "url": "http://wpackagist.org"
    },
    {
      "type": "vcs",
      "url": "git@github.com:patpetit/beetheme.git"
    },
    {
      "type": "vcs",
      "url": "git@github.com:patpetit/mostreadposts.git"
    },
    {
      "type": "vcs",
      "url": "git@github.com:patpetit/wp-mail-smtp.git"
    }
  ],
  "require": {
    "php": ">=5.4",
    "johnpbloch/wordpress": "4.2.*",
    "fancyguy/wordpress-monolog": "dev-master",
    "wpackagist-plugin/advanced-custom-fields": "*",
    "wpackagist-plugin/akismet": "3.1.*",
    "wpackagist-plugin/contact-form-7": "3.1.*",
    "wpackagist-plugin/jetpack": "3.9.*",
    "wpackagist-plugin/w3-total-cache": "0.9.*",
    "wpackagist-plugin/yet-another-related-posts-plugin": "4.3.*",
    "wpackagist-plugin/wp-pagenavi": "2.89.*",
    "wpackagist-plugin/wordpress-seo": "3.1.*",
    "wpackagist-plugin/google-sitemap-generator": "4.0.*",
    "patpetit/beetheme":"1.0.*",
    "patpetit/mostreadposts": "1.0.*",
    "patpetit/wp-mail-smtp": "1.0.*"
  },
  "extra": {
    "wordpress-install-dir": "application",
    "installer-paths": {
      "application/wp-content/plugins/{$name}/": ["type:wordpress-plugin"],
      "application/wp-content/themes/{$name}/": ["type:wordpress-theme"]
    }
  }
}

After that, I would simply need a way to mention the template or plugin bought on Envato and download it in the right folder.

I guess I would need to develop a web service to be used with composer to achieve such a goal with WordPress or any other project.

I hope everything was clear

If I understand you correctly, you might be able to get it done with the Composer Installer according to the directions found here: https://roots.io/wordpress-plugins-with-composer/