0
I have Wordpress (5.1.1) and mySQL (5.7) running in Docker containers. I successfully setup and configured my Wordpress site however unfortunately I had to reboot the machine and have forgotten the wp-admin password.
I can see and browse the site by going to the relevant port on localhost in my browser (localhost:9120) however I can't access Wordpress to allow me to make further updates to the site.
I understand that one way to change the password is using phpmyadmin and I have successfully started this in a container (Portainer shows published ports as 8080:8080). I can't however figure out how to access PHPmyadmin to allow me to change the Wordpress password.
Could someone please advise how I might go about regaining access to my Wordpress site.
Thanks
1I'm not a wordpress expert, but I would install a 2nd wordpress where you do have access, set a password for a user with the same username as the other install, then access the password hash in phpmyadmin and copy it over to the other install. The password should now be the same on both installs. – LPChip – 2019-05-13T17:20:23.763
Thanks for the feedback. While I understand what you are saying in principal I'm not sure how to execute it in practice. I can certainly create a second instance (container) of Wordpress with the same admin user. However my problem still remains; how do I use myPHPadmin (in a container) to access mySQL running in a different container. If I could do this I presumably wouldn't need to create the second Wordpress image. – TexanGeek – 2019-05-13T17:33:05.757
You are not going to run phpadmin and connect to a different container. You install 2x phpadmin sideways to the wordpress site. One phpadmin per install per database. All you do is get the hash in one install and replace it in the other. – LPChip – 2019-05-13T18:05:06.213
LPChip - thanks but I'm afraid I'm not getting what you are suggesting. I understand that (I think) that you are suggesting a fresh (containerized) install of Wordpress and mySQL. What then? How do I obtain the user hash from the fresh install and copy it to the old one? I – TexanGeek – 2019-05-13T18:46:12.807
You will end up with 2 containers. Each container has the SQL server in it, the wordpress install AND the phpmyadmin interface. On the install where you know the password, you go into phpmyadmin and copy the hash. On the install where you don't, you paste the hash back and change the password. – LPChip – 2019-05-13T19:53:41.873