Skip to content

Instantly share code, notes, and snippets.

@megclaypool
Last active November 22, 2024 23:08
Show Gist options
  • Select an option

  • Save megclaypool/c4ef29d6574a61056efb0f530bbf01ef to your computer and use it in GitHub Desktop.

Select an option

Save megclaypool/c4ef29d6574a61056efb0f530bbf01ef to your computer and use it in GitHub Desktop.

Revisions

  1. megclaypool revised this gist Jul 16, 2021. No changes.
  2. megclaypool revised this gist May 6, 2021. No changes.
  3. megclaypool revised this gist Apr 27, 2021. No changes.
  4. megclaypool revised this gist Apr 27, 2021. 2 changed files with 26 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion how-to.md → drupal.md
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,11 @@ It's got options,

    ex: `drush uli --name=rootid --uri=http://midpen-openspace-d8.test`

    A window popped up that led straight to the user page, with its "reset password" fields! I'm using it on my local, so I'll need to redo if I pull the database from Pantheon, but I'm only doing this cause Jason's out of town so there aren't any changes to pull anyhow!
    A window popped up that led straight to the user page, with its "reset password" fields! I'm using it on my local, so I'll need to redo if I pull the database from Pantheon, but I'm only doing this cause Jason's out of town so there aren't any changes to pull anyhow!

    ## Using this command with Terminus to access a site on Pantheon
    ```
    terminus drush <site_machine_name>.<env> -- uli --name=<username> --uri=https://dev-midpen-openspace-d8.pantheonsite.io
    ```

    Note that a window doesn't pop open, but after a warning about the site being in Git mode and possibly adding the site to known hosts, the login url was output into the terminal!
    18 changes: 18 additions & 0 deletions wordpress.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    # Reset a WordPress user password using WP-CLI

    If you know your username, you can just use:
    ```bash
    wp user update USERNAME --user_pass="PASSWORD"
    ```

    If you're not sure what your username is, you can get a list of all the accounts:
    ```
    wp user list
    ```

    *Note that you can also use the USER_ID in place of the USERNAME, but you're a lot more likely to know your username than some random number assigned by the database...*

    ## Using this command with Terminus to access a site on Pantheon
    ```
    terminus wp <site_machine_name>.<env> -- update USERNAME --user_pass="PASSWORD"
    ```
  5. megclaypool revised this gist Apr 27, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions how-to.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Drush one-time login link for Drupal accounts

    Holy crap, I never knew about this before, but this is awesome.

    The command is `drush uli`
  6. megclaypool revised this gist Apr 8, 2021. 2 changed files with 11 additions and 1 deletion.
    1 change: 0 additions & 1 deletion how
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    _
    11 changes: 11 additions & 0 deletions how-to.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    Holy crap, I never knew about this before, but this is awesome.

    The command is `drush uli`

    It's got options,
    - `name` for the username
    - `uri` to specify the url of the site (our weird setup requires us to specify the url of our site)

    ex: `drush uli --name=rootid --uri=http://midpen-openspace-d8.test`

    A window popped up that led straight to the user page, with its "reset password" fields! I'm using it on my local, so I'll need to redo if I pull the database from Pantheon, but I'm only doing this cause Jason's out of town so there aren't any changes to pull anyhow!
  7. megclaypool created this gist Apr 8, 2021.
    1 change: 1 addition & 0 deletions how
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    _