InMotion Hosting Support Center

In the event you cannot log into MediaWiki due to username or password failure, you can change passwords and/or find the username when the username is lost. This section of the Getting started with MediaWiki course will explain changing passwords, resetting the password, and finding the username.

How do I change my password?

When the password is reset with the "Forgotten your login details?" link, the password is changed to a generated password. The generated passwords can be difficult to remember as they are random characters. To change the password to a more memorable password, you can change it in the preferences of the MediaWiki preferences page. These are the steps for changing the password in the MediaWiki user preferences.

  1. Log into MediaWiki
  2. log-in-mediawiki-7-preferencesClick Preferences at the top left hand side of the site.
  3. log-in-mediawiki-8-changeOn the preferences page, Click Change Password in the Basic Information section of the Preferences page..
  4. log-in-mediawiki-9-change-oldType your old password and your new password twice.

    Click Change Password.


What if I forgot my password?

In the case you forget your MediaWiki password, you can use the forgot password link to reset your password and email your login details. The following will explain how to reset your password an the MediaWiki Log in page.

Reset the password with the forgot password link

  1. Navigate to the MediaWiki login page
  2. log-in-mediawiki-3-forgotClick Log in at the top right of your MediaWiki site..
  3. log-in-mediawiki-4-resetOn the Log in / create account page, click Forgotten your login details.
  4. log-in-mediawiki-5-email-sentThe Reset password special page will prompt for you to enter your username.

    Enter the username and click E-mail new password.

  5. log-in-mediawiki5a-reset-failIf the username was found the Reset password will display, A reminder e-mail has been sent.

    If the username is invalid, the Reset password page will display,

    There is no user by the name of "user". Usernames are case sensitive. Check your spelling or create a new account.

    If this occurs, you will need to obtain your username from PhpMyAdmin.
  6. log-in-mediawiki-6-new-passNext, check your email. The MediaWiki site will email you a new password. The email should look like the snapshot to the right.

    Now you will be able to log in with the new password. After you log in you can reset the Password in the MediaWiki Preferences.

When MediaWiki is installed as a Binary database character set, The password cannot be changed through PhpMyAdmin. If the email address is not valid for whatever reason in your user preferences, the Forgotten your login details? link will fail to email your new password. In order to change the password, a bash script can be ran to update the password. The following steps will explain how to change the password through shell.

Changing or resetting the Password through shell

  1. SSH into your server.

    Note! Not all servers have SSH access. On InMotion Hosting servers, only VPS (Virtual Private Server) or Dedicated servers have this available. If you need to change the password through shell on a shared server, contact support.

  2. log-in-mediawiki-10-bashNavigate to your MediaWiki maintenance directory. For example:

    cd /home/userna5/public_html/mediawiki/maintenance

    Run the following bash command (Supplement the admin with your username and the pass1234 with the password you want to change to).

    php changePassword.php --user-admin --password=pass1234


What if I forgot my username?

When the Forgotten your login details? link on the Log in / create account page fails to find your username, The username can be retrieved by logging into PhpMyAdmin and locating the username in the database. The following section will explain how to recover your MediaWiki username from your database through PhpMyAdmin.

  1. Log into cPanel.
  2. Navigate to Databases > PhpMyAdmin.
  3. log-in-mediawiki-11a-click-databaseSelect the database for the MediWiki site.
  4. log-in-mediawiki-12-select-users-tableFind the users table.

    Note!The Prefix will vary depending on the installation. Prefixes can look like mw_ or wiki_ depending if it was changed during installation.

  5. log-in-mediawiki-13-find-usernameFind the username in the user_name column of the table row.
Was this article helpful?
Continued Education in Course 101: Getting Started with MediaWiki
You are viewing Section 5: Managing passwords and usernames in MediaWiki
Section 4: How to log into MediaWiki
Section 6: Managing User Accounts in MediaWiki

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

n/a Points
2017-05-22 6:57 am

Thanks, Tim, for correcting the shell method.



n/a Points
2017-01-13 4:28 pm



im crazy new to this and could not get the email to work in my wiki so im thinking ill just have to do things manually. i attempted the shell option and recived this error 


# php changePassword.php --user-test2 --password=apple

A "user" or "userid" must be set to change the password for


what does this mean? 


i really appreciate any help

11,000 Points
2017-01-13 4:31 pm
It looks like it does not recognize the user for which the password change was submitted.
n/a Points
2017-01-13 5:48 pm

hello again 

so i just discovered that in step 2 of 

Changing or resetting the Password through shell

the command says 


php changePassword.php --user-admin --password=pass1234


between user and admin is a - and should be =

n/a Points
2016-11-25 1:03 am


13,821 Points
2016-11-25 8:28 am
Can you elaborate on what you are trying to do?

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

6 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!