HowTo: Mediawiki Reset a User Password

I forgot my mediawiki wiki software password, how do I reset my password?

You can easily reset mediawiki password as follows:

Advertisement

Using changePassword.php Script

You need to login to your server using ssh client where your mediawiki is installed. Next, you have to run the script from the command line. Once logged in go to the installation directory, then go to the maintenance subdirectory. In this example, mediawiki is installed at /home/httpd/wiki directory, enter:
$ cd /home/httpd/wiki/maintenance
Finally, run the following command:

 php changePassword.php --user=YOUR-USERNAME-HERE --password=YOUR-PASSWORD-HERE
# reset a password for Vivek user
php changePassword.php --user=Vivek --password=myPassowrd

Sample outputs:

Password set for Vivek

Now you user Vivek can login without any problem.

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

1 comment… add one
  • Hitesh Suthar Aug 23, 2016 @ 2:40

    I forget the wiki pedia password and username

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.