Question: I have my own website & domain. It has a wordpress blog. I forgot the password and basically now m locked out. It gives following mesage:

```
Possible reason: your host may have disabled the mail() function.

```

I checked on google, many people sAID to go to database and change password. I tried doing that too but still I am locked out. Can anyone help?

Answer: 
I fixed the problem myself by adding a new row of a user in users table and then in users \_ meta table, I updated the user id to be the Id I added in users table. For example, if user id added was 2 then to give administration privileges, I updated user id 2 in user meta table. This fixed the problem.
create one php file and add following code in it.

```
<?php 
define('WP_USE_THEMES', false);
require("wp-load.php");
$user = array('user_login' => 'username','user_pass' => 'password','user_email' =>   
'youremail@domain.com','role' => 'administrator');
var_dump(wp_insert_user($user));

```

change "username" and password value to something that already not have like
 username:fscore25 and password: 123456 you can change password later on and also add another email address which is working fine for you.

upload file to root of your wordpress installtion.
it should be with file named wp-load.php

then go to your browser and execute this file using
<http://yourdomain.com/yourfilename.php>

hope it helps