I have a development and a production wp installation using types, cred, views, etc..
When i want to publish from development to production, i want to be able to export a file and import the contents into the production site.
I can do this manually, but i want to automate the process.
How can I import a ZIP containing a module programatically or from the command line?
That's not something we can assist here.
Toolset Module Manager (and the rest of Toolset or WordPress) surely offers hooks to use to programmatically do what it does already in the GUI, but we do not assist this.
Only the Public API is assisted, which concerns Toolset Forms, Views and Types mostly.
Expertin or Importing programmatically is not something that we publicly document.
However with the existing module manager and other Toolset Features to import/export all kind of data, along with WordPress's inbuilt mechanisms, we think the palette is pretty much covered.
What exactly do you miss?
An automated feature that pushes changes (eventually a limited list of) to another server?
This is probably out of the scope of any Plugin in the WordPress ecosystem.
Please let me know if I misunderstood the request.
Exactly what i am looking is to import a toolset modules exported file using the command line (like wp-cli) or the instructions to import the zip using php code without using the UI.
Will this be possible?
Hi, as Beda said this isn't something we offer assistance for here in the forums. We can help you implement any public API, but since there is no public API for the Module Manager we do not have any examples or advice to provide. I can see how a wp-cli tool would be quite useful during development, but at this time it is required to use the GUI to import Modules. If you would like to submit a Feature Request, please start a new ticket as a "Request" and describe what you would like to accomplish with a wp-cli integration. Our team will evaluate the request for feasibility and decide whether or not to implement it.
Check out the Toolset-based Themes program, which gives you the ability to include default content and Toolset plugins directly in theme files you author and publish: https://toolset.com/documentation/user-guides/how-to-build-toolset-based-themes/
It may be a useful alternative to automated Module imports.