Sometimes, WordPress administrators may lose access to their admin dashboard due to forgotten passwords. If you’re running your website on a Linux VPS UK, Linux VPS, or any other UK Linux VPS, this guide will show you how to reset the WordPress admin password directly from the command-line.
Steps to Reset the WordPress Admin Password Using WP-CLI
One of the easiest ways to reset the admin password is by using the WordPress Command Line Interface (WP-CLI). If your site is hosted on a Linux VPS or any Linux VPSServer VPS environment, follow these steps:
- Access Your VPS: Log in to your Linux VPS or any Linux VPSVirtual Private Server using SSH or Remote Desktop. For UK Linux VPS users, you can easily connect through your VPS provider’s console.
- Navigate to the WordPress Installation: Use the command line to move to the directory where WordPress is installed. For example:
cd /path/to/your/wordpress-installation
- Run WP-CLI to Reset the Password: If WP-CLI is installed on your Linux VPS Italy or another virtual server, execute the following command:
wp user update USERNAME --user_pass="NewPassword123"
Replace
USERNAME
with the admin username andNewPassword123
with the desired new password. - Verify the Password Change: Once the command has run successfully, log in to your WordPress admin dashboard with the new password.
Using phpMyAdmin to Reset the Password
If you do not have WP-CLI installed on your Linux VPSVirtual Private Servers, you can reset the password via phpMyAdmin, which is available on most VPS Linux VPSServers and Linux VPS Hosting UK solutions.
- Log in to your phpMyAdmin control panel on your VPS Linux VPSHosting account.
- Select your WordPress database from the left-hand menu.
- Navigate to the
wp_users
table and find the admin user. - In the user_pass column, enter the new password in MD5 format. You can generate the MD5 hash using any online tool.
- Save the changes, and you should now be able to log in with the new password.
Conclusion
Resetting your WordPress admin password is simple whether you’re using Linux VPS UK, UK VPS Windows, or any Virtual Private Server Hosting Windows solution. Both WP-CLI and phpMyAdmin provide easy ways to regain access to your WordPress dashboard. For reliable and powerful Linux VPSVirtual Private Server Hosting, visit Linux VPS UK for excellent Linux VPSVirtual Dedicated Server Hosting solutions.