welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 167 forks source link

Push specific plugins/themes #432

Closed JoshRiser closed 2 years ago

JoshRiser commented 6 years ago

It would be a really nice feature to be able to selectively push or pull a specific plugin or theme. I've had scenarios where I push a plugin updates to the production server and someone added/removed/updated another plugin and it gets overwritten. It would be cool if I could do something like:

wordmove push -e production -p 'plugin-name'

I'm not sure how doing options in ruby scripts work so it might not work exactly like that but you get the point.

alessandro-fazzi commented 6 years ago

I'll take this one one. But I'll take in consideration that in your scenario a shared GiT repo would almost solve the problem :)

JoshRiser commented 6 years ago

Great point. Would be cool then to also integrate git into wordmove but maybe I'm just getting lazy at that point ;P

alessandro-fazzi commented 6 years ago

With the new hook system you could also try to invent some kind of integration :)

JoshRiser commented 6 years ago

Well that does look promising. Will definitely be working with that.

colin-marshall commented 6 years ago

@pioneerskies would it be possible do something like this with selective tables of the database? For example, only push/pull posts.

Sometimes I'm working on sites locally and have changed something like plugin settings, and there will also be posts that the client added on the production site that I don't have locally. That leaves me with database changes on both sites that need to be merged.

It looks like the WP-CLI can do this already so it might not be too difficult to implement.

alessandro-fazzi commented 6 years ago

Hi @colin-marshall :)

it would be possible, but it is really OT here. I'm thinking about an implementation that should cover your request and the request to dump prefixed tables ( #243 (your) #442 and #219 ).

Please, let's continue discussion in #442

debonx commented 5 years ago

Is this still on progress? Thanks

alessandro-fazzi commented 4 years ago

Working with @huraji on #551 we "discovered" an apparently stable approach to achieve this feature using the exclude section in movefile.yml:

exclude:
  - "+ wp-content/plugins/plugin_1/"
  - "+ wp-content/plugins/plugin_2/"
  - "wp-content/plugins/*"

will ignore all the plugins but the one expressed with the trailing + sign.

Hope it could be useful for others

P.S.: this is not a new feature: is just rsync's black magic

alessandro-fazzi commented 4 years ago

Doc added https://github.com/welaika/wordmove/wiki/Work-only-on-specific-plugins-or-themes and linked in https://github.com/welaika/wordmove/wiki/movefile.yml-configurations-explained

debonx commented 4 years ago

Doc added https://github.com/welaika/wordmove/wiki/Work-only-on-specific-plugins-or-themes and linked in https://github.com/welaika/wordmove/wiki/movefile.yml-configurations-explained

Thanks @pioneerskies. Very useful if some maintains a lot of sub repositories within the same WP instance.

alessandro-fazzi commented 2 years ago

Closing since it's possible to achieve the result w/o a new feature