Lost Admin account within Word Press 5.6.0

I have moved a word press website from one hosting company to another. We had the ability to access  the website, to make subtle changes, prior to the move. Now we have no access via the front end. I am able to access the database via the 'phpMyAdmin' interface through our new hosting companies interface.  I don't know anything about Word Press. Through my research on lost passwords I managed to poke around the database to attempt to revive the last know user login. I was unsuccessful in locating the login. I have some questions:

Could the new hosting company setup our word press database without logging in? They stated that they have changed nothing.

I don't see, with in the phpMyAdmin interface, a place to create a new ADMIN user account. My research info doesn't seem to match the phpmyadmin interface. I'm hesitant, without further advice, to make any changes.

I wanted to change the password of an existing user (I can't seem to identify if they are an admin). Can I do this w/out causing any problems with in the DB? Can I rename the user account? How can I tell what privileges this user has?

Being I'm a novice, in this area, can someone explain why I'm able to access the inside of this database w/o any user/login through phpmyadmin via my new hosting company? Yet, I'm unable to utilize a previously working user/password.
LVL 1
GeeMoonIT ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gr8gonzoConsultantCommented:
So you're combining 2 completely different concepts: Wordpress (the application) authentication and MySQL (the database) authentication.

The hosting company has full access to your database. That's part of their job.

Assuming you have a cPanel account, you're authenticating against an internal portal, which is how you're able to use phpMyAdmin "without any user/login" - it's not that your database isn't protected but rather that you've already authenticated to your entire hosting account in cPanel, which gives you easy access to all of these other admin tools like phpMyAdmin.

Wordpress is simply a PHP application that makes use of the MySQL database. It stores its credentials within the database table "wp_users" in a column called "user_pass" - those credentials are encrypted/hashed one-way with salt values (which are defined in your wp-config file), so there's no way to turn those hashed values back into their original password. The wp-config file salt values MUST be the same as they were before your move to the new hosting company in order for the logins to continue working.

Also, the wp-config file needs to have the correct database connection information for your new hosting company, in case the database name changed or the username/password changed.

One last note - the version you mentioned in the title (5.6.0) is the MySQL version, not the Wordpress version. Wordpress is only up to version 4.9.5 at the moment.
0
GeeMoonIT ConsultantAuthor Commented:
Thank you for the clarification. I totally needed that, yet, I still feel partially in the dark.

Does this sound like something my hosting company can solve, or do I need to press the previous unhappy hosting company for a key info? I was hoping I could just change 'delete/create' a new password - or even a new admin account via the phpmyadmin. Is that not possible based on what I have access too?
0
gr8gonzoConsultantCommented:
If you want to reset your admin password for Wordpress, create a blank new file in the root of your Wordpress folder (so it's in the same directory as wp-load.php), and then paste in this code:

<?php
// Load the WordPress library.
require_once( dirname(__FILE__) . '/wp-load.php' );

// Update the admin password
if($wpdb->query("UPDATE wp_users SET user_pass='".wp_hash_password("123")."' WHERE user_login='admin'"))
{
  echo "OK";
}
else
{
  echo "Failed";
}

Open in new window


Then just change 123 to whatever you want your new admin password to be, and then access this new script with your browser.

As soon as it finishes and says "OK", test your login and assuming it works, delete the script file.
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

gr8gonzoConsultantCommented:
It's likely something you can resolve yourself or if your new hosting company is willing to help you configure things, then I'm sure they have the access to do the work.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GeeMoonIT ConsultantAuthor Commented:
Thank you for your help gr8gonzo

Unfortunately I was not confident enough to start adding, or editing code.

It turns out I was able to gain access just by editing the password to one of the existing accounts viewed via the phpmyadmin interface. Once I successfully logged into the dash board, I was able to reconfigure that account to a username/email I desired. I also created a new account with full admin rights.
0
GeeMoonIT ConsultantAuthor Commented:
It turns out I was able to gain access just by editing the password to one of the existing accounts viewed via the phpmyadmin interface. Once I successfully logged into the Word Press dash board, I was able to reconfigure that account to a username/email I desired. I also created a new account with full admin rights.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.