There are few moments more heart-stopping for a website owner than realizing you’ve been locked out of your WordPress admin dashboard. Whether you’ve forgotten your password, a plugin conflict has disabled your login form, or a rogue script has changed your credentials, the feeling of being powerless over your own website can be terrifying. While the standard password reset email is often the first solution, what happens when that fails? In these critical moments, you need a more direct approach to regain control. This guide will provide two quick, practical, and highly effective methods to reset your WordPress admin password directly through the database using phpMyAdmin or the command line with WP-CLI, getting you back in the driver’s seat. These are the kinds of advanced solutions you'll need when you are unable to perform a simple fix, like the ones in our guide on How to Troubleshoot a 403 Forbidden Error.
phpMyAdmin is a web-based tool that allows you to manage your website's database. This is a common tool provided by most hosting providers. This method is a great solution when you are locked out of your website and the standard email reset isn't working. Before you begin, always backup your database.
wp-config.php file._users (e.g., wp_users). Click on it.user_pass field, find the "Function" dropdown and select MD5.Note: MD5 is an older hashing method, but WordPress will automatically re-hash it to a more secure format the moment you log in with your new password. This is a crucial step to avoid security issues, a topic we cover in our guide on how to secure your website against basic threats.
For more technically inclined users, WP-CLI (WordPress Command Line Interface) is a powerful tool that allows you to manage your WordPress installation without a web browser. This method is incredibly fast and efficient. You will need SSH access to your server for this to work. You'll need to know your SSH credentials, which are usually in your hosting dashboard.
cd command to navigate to your website's root directory (e.g., cd public_html/yourwebsite.com).'your_username' with your actual username and 'your_new_password' with your new password:
wp user update your_username --user_pass='your_new_password'
While these methods are powerful, they require direct access to your server and a degree of technical comfort. If you are not comfortable using phpMyAdmin or the command line, or if you suspect your website has been hacked, you should not attempt these fixes on your own. A hacked website often has more than just a changed password; there could be malicious code or a backdoor script that needs to be removed. In these cases, a professional can not only reset your password but also perform a full security audit, which is a key part of our guide on how to protect against hacks and recover from breaches. This is one of the clearest 5 signs that you need professional help to fix your website, as an incorrect fix can have disastrous results.
If you’re still having trouble, don’t worry! WebCare SG is here to help. Contact us today for fast and reliable website fixes.
Poor SEO optimization is a common issue many website owners face, but the good news is that it can be fixed.
A practical guide for Singaporean businesses to master local SEO, covering Google Business Profile optimization, local directory listings, and strategies for gathering impactful customer reviews.
Learn how to write effective page titles and meta descriptions, implement JSON-LD schema markup, and validate your code to improve your website's search engine visibility.
Whatsapp us on