Change a WordPress password with SSH

You can make changes to your database through SSH, which you can use update your WordPress password.

Warning: The information in this article is advanced material we make available as a courtesy. Please be advised that you are responsible for properly following the procedures below. Customer Support can't assist with these topics.
  1. You should always backup your site before performing any changes.
  2. Connect to your server or shared hosting account with SSH
  3. Connect to MySQL using the following command:

    mysql -u username -h host database -P port -p

    Enter the database information from your database as follows:

    • username is your database username
    • host is your database hostname or IP address
    • database is the database name
    • port is the port MySQL is running on (by default this is 3306)
  4. When prompted, enter the password for that MySQL user.
  5. Enter the following MySQL command to switch to your WordPress database:

    mysql> use database

    • database is the database name
  6. Enter the following command to see a list of the tables in the database. Make notes of the table containing "_users".

    mysql> show tables;

  7. Enter the following command to see the contents of your "users" table. Make note of the number in the "ID" column for the user you want to update.

    mysql> SELECT * FROM table;

    • table is the name of your users table.
  8. Use the following command to set your new password.

    mysql> UPDATE table SET user_pass = MD5('password') WHERE ID = id;

    • table is the name of the users table.
    • password is your new password
    • id is the number you located in Step 7

You can now login with your new password

More Info

More info about WPPS.

이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.