The relevant transcript for this video is found below:
Hey there, Joomla Fanatics! Tim Davis here. I'm a Joomla fan too. Thanks for tuning in to today's Maintenance Monday live stream episode number 32.
As always, I appreciate your support of this channel. We've got some new subscribers in the last week since we went live last, so welcome to all the new subscribers. If you're watching this on the replay please subscribe, ring that bell. You'll get notifications of new live streams and also tutorials when they're added to the channel.
If you're watching live, why not give the video a thumbs up. That would be great. That'll help other people to find it.
So today we're going to revisit a bit of a topic that we looked at a number of weeks ago, and we're going to look at a new method to recover or to reset a lost superuser password for your Joomla site. Now John Moholt gave us in the comments for that video a really great, really cool method, very easy, to reset a password. And others shared some other methods as well.
We're gonna look at them over the coming weeks. But I thought we'd take a look at John's today. It involves changing the super admin password or any password right in the database. You can type in a new password and it gets encrypted. It's really cool, really easy, and why don't we head on over to pay attention to the screen and we will check that out right now.
Hey, before we do get going, I just want to give you an update. I mentioned this a couple of months ago. There's a new prize that was going to be added to the monthly giveaway, and I was hoping to have that ready for February but it took a little while to get sorted out and it's still not quite sorted out but I can tell you right now, in fact, I should probably just switch back quick here, tell you right now that in March's contest, we are going to be adding to the giveaway, not only the one-year subscription to manage one site on myjoomla.com, or one month to manage as many sites as you want, or together with a free pro version - a free Pro subscription to any of Peter Weston's RegularLabs.com, a professional version of extensions, and now also we're going to be adding a giveaway every month "Joomla 3 Explained." It's a paperback book. It will be shipped to your house if you're the winner and you live in its shipping area. So that might work well for you or might work well for one of your clients or your friends, that's starting to use Joomla if you win that book.
Alright. Now we'll head over to the screen here, and to enter that contest all you need to do is go to basicJoomla.com, go to giveaways and you will be taken to the most current contest, and as you see there are five days left before we give away March's prize packs. So head on over there and enter, and you can enter often. There are lots of different ways to do that. All right.
Now to the topic of the day. Let's check out how we can reset a lost password for our Joomla database for our website. So basically what you want to do is:
- Go into the hosting control panel for where your website is hosted. I use cPanel here for my company, and then
- Go down to databases.
- In the database area, you want to click on phpMyAdmin or whatever tool your web host offers to allow you to go right in and manually do things with your database. I'm going to click on that and then in your account, you will see down the left-hand side a whole list of all of the databases. I have quite a few because I have lots of installs in this particular account for doing different tutorials and things. You want to pick the right one.
- Now if you don't know which database it is that is running your website, go to whatever tool they give you for managing files, click on that, and then go to the folder where your Joomla site is installed. Because I have lots of sites I have them in many subfolders here. Find your "configuration.php" file. Right click on that, and go to edit, and then you're going to see down the list, you will see where it says DB, and the public $db = basicjoo_ jos2. In this case basicjoo being the shortened version of my Basic Joomla site login.
- So we know the database that's named jos2 is the one we want to go into so when we go back to phpMyAdmin we then just click on that database and then we'll be presented with a list of all the tables that are in that database. Depending on how many tables there are in your Joomla site, you might have to go to the very bottom and then scroll and go to a second page. Not so with this site. But what you want to do is find the table that is "_users". You might have different three letters and you probably should for security reasons, than "jos_users" but
- Find the "users" table and then click on "Browse." Now you'll be presented with a list of all the users in your site and as you see, I only have one user on this site, and it is my login, and then here comes the trick.
- Here's what your password is if you have forgotten it, but of course, that's not going to do anything for you is it? Over here to the left of the line click on edit, you'll see next to a pencil.
- So we go to edit and click on that, and then there we'll be presented with fields showing all the contents of all of the different lines. We want to go to the password field.
- Click on the drop-down, and go down and select "MD5". Alright?
- Next what you're going to do is you're going to go and select the hash, or the encoding, or your current password that's all encrypted, and I'm going to delete that. Empty it.
- Now you can type in your new password. I'm just going to type "new password."
- Next, just go down to the bottom and click on "go."
And you'll see that now you have your new password and it has been encoded right here in this line. You could actually go back and edit and see, there it is all encoded, which is great. Just click back on that. Now all you need to do is go and test this.
Let's go to the back end of the site. I'm going to log out and my username on this site is public admin and I'm going to type "newpassword". Hit enter, and there's your new password. You can even update it if you want.
Now, of course, don't use "new password" for your password. You want something else, but at this point, now that I'm in the back end of the site I could go to "users", "manage" and I could then click on "super user" and then I could go to "password" and I could put in "better password". Write it down; remember it. We'll save that.
The cool thing is we can go back to that table to "user" and we'll go to jos2, scroll right down to "user", click browse and there you have it! The password has been changed.
So that's a pretty easy way to gain access to your Joomla site or a Joomla site you're helping someone with when the super admin password has been forgotten, and you can't log in to the backend to reset it, because you cannot use the password reminder to recover a superuser or super admin password. I know not everybody is super comfortable with going into the database - they're a little bit afraid of going into the phpMyAdmin. And you should be afraid. In fact, before you do anything with the database, I should have said, make sure you backup your Joomla site before doing this. So there are other ways that you can do that without going into the database and into the tables if you're not comfortable with that.
So thanks again for your support of this channel. I appreciate you watching and as always, for your support of this channel. I thank you for that. Hey if you haven't, subscribe, ring that bell, and you'll get notices and updates and that will help the channel grow, help others find out about this channel as well. So until next time, enjoy your Joomla sites and God bless.