Create a WordPress admin user for a WordPress site via MySQL

This will or has happened to all of us at some point. It could come in many forms, inheriting a project without login details or the client might not be in a position to remember their login details. The problem varies from client to client and project to project.

If you have access to the database, you can create an admin user by executing the following SQL script:

If you have access to the WordPress installation but not the database, check out this function you can paste to create a new user for yourself.

Code, music, craft beer and traveling to remote areas are the only real languages I speak.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store