Created
July 31, 2018 17:37
-
-
Save digisavvy/884eb3aeab4bca5b20ad3c493d1600a6 to your computer and use it in GitHub Desktop.
Add a WP Admin User when you ONLY have FTP access
This file contains hidden or 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
| <?php | |
| // 1. GO TO THE THEME’S FOLDER, DOWNLOAD AND OPEN FUNCTIONS.PHP IN YOUR CODE EDITOR. | |
| //path: /wp-content/themes/customtheme/functions.php | |
| //2. ALL THE WAY TO THE BOTTOM OF FUNCTIONS.PHP ADD THIS LINE OF CODE: | |
| wp_insert_user(array('user_pass' => 'password_here', 'user_login' => 'username_here', 'role' => 'administrator')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment