PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, February 20, 2022

[FIXED] How to create new wordpress admin user from FTP

 February 20, 2022     phpmyadmin, sql, wordpress     No comments   

Issue

I haven't logged into the wordpress backend of my website in a couple years.

Now, however, none of the passwords I use seem to work. I request a reset, but I NEVER get the email.

I went into PHPMyadmin to change the password of the user, but that doesn't seem to work. The site is still not accepting the new password. I created a new user from phpMyAdmin and that user is still not recognized. So I'm not sure the database I'm updating is the correct database, however it's the only one available. Have I been hacked? I don't understand how none of my passwords are working, I am not receiving lost password emails nor are any of my new users or changed passwords from the phpMyAdmin being recognized.


Solution

https://wordpress.org/support/article/resetting-your-password/

  1. Login to your site via FTP and download your active theme's functions.php file.

  2. Edit the file and add this code to it, right at the beginning, after the first

    wp_set_password( 'password', 1 );

Put in your own new password for the main admin user. The "1" is the user ID number in the wp_users table.

  1. Upload the modified file back to your site.

  2. After you then are able to login, make sure to go back and remove that code. It will reset your password on every page load until you do.



Answered By - evayly
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing