grunt-deployments
grunt-deployments copied to clipboard
Make url option more agnostic
Currently we expect the user to want to run a search and replace on a single ref in the database. This is url because WordPress (which the Plugin is designed for) stores siteurl in the database and it needs updating when you migrate the DB to a new environment.
However some scenarios might call for several DB refs to be replaced. Suggest renaming the option to be searchreplace and allow the user to define a series of search and replace statements.
Suggestion:
searchreplace: {
['search_term1','replace_term1'],
['search_term2','replace_term2']
['search_term3','replace_term3']
}
WP DB Migrate Pro also modifies the path to the web root. This is a good example use case for wanting to have multiple search and replace targets.
This plugin has far more potential than simply WordPress migration! I use it on other frameworks such as Laravel and would love to see this feature implemented. I ran into this issue when setting the definer in a stored procedure which is environment dependent.
@jabes Good to know you're finding this useful elsewhere. Do you have any experience working with Grunt? Would you like to contribute? I'd love to see a pull request. If not I'll try to get around to this...