Textpattern CMS support forum
- From: Virton (BE)
- Registered: 2004-10-01
- Posts: 675
Plugins export then import+install
Hello, creators / users of plugins! Happy New Year !
For each site, I have to import and install many plugins in place on my last finalized site. Is there a plugin for bulk export plugins, and then mass import plugins exposed, with their installation. These plugins would be in a folder, format txt or php. Adding two loops in ied_plugin_composer should be fine, it seems to me.
Another question: simply importing the table of plugins from one site to another would it work? I doubt it, because of the operations related to the installation which would be missing (creation of preferences, tables, …)
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 7,911
Re: Plugins export then import+install
jpdupont wrote #308486:
Is there a plugin for bulk export plugins, and then mass import plugins exposed, with their installation.
There is one by Gocom that I think other people have used with success. There’s a (sort of) sneaky ability to do this in Txp 4.7.0 – loading content via flat files – but it’s not official yet and I haven’t checked recently how far makss got with it.
I know it’s possible to import article, link, comment, section, and so forth from files. Never tried with plugins, but there’s no reason it won’t work.
Actually, spoiler alert, Txp is one tiny plugin away from being able to do that when you import themes – and this may even be available in core in future. By hooking into one of the import theme callbacks (the dust is still settling on the names, I’d wait a few days) it’s possible to load entire sites from XML files in your themes folder – content, sections, prefs, plugins, the works. And with our shiny new plugin API now built, this means plugins can be uploaded and installed independently of the Plugins panel.
The only tricky part – and this is the reason it’s not an official strategy yet – is files and images because they need references to actual assets somehow. We’ll figure that out one day.
For now, take a look in the
textpattern/setup directories to see how it’s done in core. The ‘data’ and ‘articles’ directories in particular show how the XML files should be structured.