You can edit and run the below SQL query in your database.
Make sure there are no users with the existing ID you specify. If there are change all instances in all 3 tables, currently set to 4 to another number that does not yet exist.
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'Matt Royal', '[email protected]', 'http://mattroyal.co.za/', '2014-06-09 00:00:00', '', '0', 'Matt Royal');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10');
Related Posts:
- In Django, how do I know the currently logged-in user?
- Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
- SSO / authentication integration with external ‘directory service’
- Preventing session timeout
- Check for correct username on custom login form
- ‘Password field is empty’ error when using autofill in Chrome
- Prevent wp_login_form() from redirecting to wp-admin when there are errors
- How to disable autocomplete on the wp-login.php page
- how to display the wordpress login and register forms on a page?
- How can I send a welcome email to a user AFTER they login for the first time?
- How can I add a custom script to footer of login page?
- Is it alright for two people to simultaneously be logged into a WP site as administrator?
- How do I turn off the ability to login?
- Give visitor access to password protected page/post via external script
- WordPress Login Footer URL
- Cookie settings for session across WPML subdomains using custom AJAX login
- moving server can not login
- Save last login date in global before change it?
- Is there a way to remove wp-login.php alias (login)?
- How to get login data (session) outside WordPress?
- password protect individual pages
- Change register form action url
- Remote REST request to check login status
- Is back-end access not required for an app to post to my blog?
- Force user to login in home page
- Store brute-force IP addresses
- How do I make my site publicly viewable? Everything redirects to wp-admin
- How to create a private login page for admin.?
- WordPress Security – How to block alternative WordPress access
- Protecting WordPress login page
- Different homepage for logged in users
- reset password link redirect to login page
- Deregister default wp-admin css on login screen only?
- Can’t login to WordPress without hitting the Remember Me checkbox. Potential SSL implementation bi-product
- SSO to WP, from a non-wp site on a different domain and server
- How can I login as admin after redirect to custom login page
- Redirect users after failed login attempt?
- Login with serialized password
- is_user_logged_in() not working in Firefox
- Why would the login page reload indefinitely?
- Single sign on with custom site
- By registering always make uppercase the first letter of the login
- Set Default User Role
- Creating custom login errors
- Lock out all WordPress Administrators except two specific users
- Removing wordpress cookie from non-wordpress site
- Why is wp-login trying to send an email?
- Replacing default display name to login name
- Why does is_user_logged_in() return false after I change user password on the front end?
- How to generate “WP_Error” Object for user login?
- ?login=failed only attached to URL under certain circumstances
- WordPress not logged in locally with correct username and password
- my wp-login page doesn’t load [closed]
- WordPress SSL not working [closed]
- Requiring login for specific pages
- login trouble WordPress can change IDs created by hoster site
- login/logout for only one page
- WordPress registration page template
- what is the best and safest way to allow users to register to site
- How to force “remember me” users to login again?
- Reset Password Limit not working
- User not able to sign in after wp_authenticate() and wp_signon() wordpress
- WordPress site login Redirect
- Thank You Page Layout Differs on User Logged In Status
- On Homepage “is_user_logged_in()” function is not working after login and it is working after refresh the page?
- Problem in auto login after registration
- Cant reset password my wordpress password not even with phpMyAdmin
- Confused – can’t access wordpress dashboard or site that has been published
- wordpress login loop and session problem
- Get WordPress logged in username from root domain when WP is installed in a subfolder
- How to invalidate `password reset key` after being used
- wp-cron event doesn’t run when custom login API is enabled
- Does it make sense to check a nonce on user log in?
- Special link for no automatic login (no username and no password)
- unable to Login to Admin
- Global login to password protected pages
- Disable / Remove Password for Login WordPress
- WordPress Auto Login From Email Link
- Building a custom login form – encountering issues
- ERROR: Cookies are blocked due to unexpected output – ultimate solution
- Making sure two different wordpress website has auto login
- Site login failed due to strange warning
- How do i Redirect specific user(WooCommerce Sign-in not wordpress admin page sign-in) to specific page
- Chosen user password in registration is not being accepted on Login
- Improvements to “limit login attempts” plugin
- Add a required field to Registration
- loging to Admin page not working at all
- Can’t login through wp-login.php on fresh installation
- WordPress Cookies – wp_set_auth_cookie
- Authenticate return value
- Front-end login problem: requires re-authorization when accessing dashboard
- Using wp_login_form passowrd as undefined
- Redirect non-members to about/intro page
- Logging in takes a few refreshes to show you are logged in, is this a cache issue? [closed]
- When trying to login if already logged in, form just shakes – error message remains empty
- Handle POST request sent from an external site for login?
- Unable to login after adding ReCaptacha without API key
- How to create an alternative login page that does not use any plugins?
- Entire WordPress content disappears
- Remove login link from Reset Password-screen