Skip to main content
2 of 4
added 12 characters in body; edited title
norman.lol
  • 19.1k
  • 6
  • 75
  • 129

How can I execute Drush commands programmatically?

I'm working on a site (D8), and part of the requirement is giving the client a page that they can click a button to do a particular task. I am able to do this using a Drush command using CLI. But I want to make this as a code. I had seen php_exec() and invoke_process() function. But can anyone explain how to use this?

Rifas Ali
  • 510
  • 3
  • 8
  • 19