Skip to content

Instantly share code, notes, and snippets.

@DanLaufer
Last active May 12, 2019 17:41
Show Gist options
  • Save DanLaufer/20060ae20547f88286247c23d4f011d9 to your computer and use it in GitHub Desktop.
Save DanLaufer/20060ae20547f88286247c23d4f011d9 to your computer and use it in GitHub Desktop.
Drupal 8 - Run PHP script on a local & remote environments

Run PHP on Lando Environment

Note: you must have <?php at the beginning of the script.

lando drush scr ./myscript

Run PHP on Remote

Note: you must LEAVE OUT <?php at the beginning of the script...

cat ./myscript.php | drush @mysite.live scr -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment