Reputation: 1056
I'm want to run a wp_cli command from my php script.
for example: sudo -u www-data wp search-replace "foo" "bar" --all-tables && sudo -u www-data wp cache flush
Is there any way to do that but from inside a php script function?
Thanks.
Upvotes: 0
Views: 154
Reputation: 450
For wordpress, You can try plugin "Better Search Replace" for search-replace functionality and also i have one script in php for search and replace functionality which is you can download from "https://www.dropbox.com/s/xbizw2su90ndz9j/script.php?dl=0".
Upvotes: 1