Created
March 23, 2024 00:05
-
-
Save adamziel/04d98abef8567755fbf003a4d515ed79 to your computer and use it in GitHub Desktop.
Log in as a user with an editor role
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"landingPage": "/wp-admin/", | |
"steps": [ | |
{ | |
"step": "runPHP", | |
"code": "<?php require '/wordpress/wp-load.php'; $user_id = wp_create_user('myuser', 'mypass', 'myuser@localhost'); (new WP_User($user_id))->set_role('editor');" | |
}, | |
{ | |
"step": "login", | |
"username": "myuser", | |
"password": "mypass" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment