If you locked yourself out of your WordPress account, and you can’t figure a way to log back in (even not with recover password), you can get around it by using the command line.

This will only work if you have ssh access and have installed WP-CLI. WP-CLI is such a handy tool, for instance, to automatically update your WordPress installations, that I would recommend it to everyone.

Once you have installed WP-CLI, enter this command in your WordPress project root folder.

wp user update myuser --user_pass=mypassword

Replace myuser and mypassword by your username and password.

Remember that it’s unsafe to enters passwords in plain text through the command line. It is for example tractable with the history command. Once you did this, login to WordPress and change your password the normal way.

  • Published:October 9th, 2012
  • Category:Wordpress

To follow my example. This blog used to be on www.robinbrackez.be/uitgewerkt, and is now on www.developed.be

1) Backup/restore your database

If you want the website to be on a new databases (which is not always necessary), take a backup of the entire database (phpadmin > export > to file) and restore it in the new database (phpmyadmin > import > from file).

2) Edit wp-config.php

On a local copy of the website, edit the wp-config.php to edit the database settings. Edit the constants: DB_NAME, DB_USER, DB_PASSWORD. (in case there’s a new database, of course).

Continue reading “How to move a WordPress from one domain to another?”…

Wordpress.org clearPaper by CreativeBits.it Copyright © 2012-2019 Robin Brackez. All rights reserved. By visiting this site you agree to accept cookies that are purely used to check how many visitors I have. Theme by: creativebits. Custom adaptations by Robin Brackez.