How to add google reCAPTCHA to phpmyadmin login screen?


i want to secure my phpmyadmin from false login attempts , so i was thinking of how to add google reCAPTCHA to the login page to make it secure. so any idea how to do it?

Supporter Asked on December 1, 2016 in Software.
Add Comment
1 Answer(s)
Best answer

ya its good thinking to add google reCAPTCHA to phpmyadmin login page to make it secure.  To add reCAPTCHA first make sure you have latest version of phpmyadmin installed as older version not support reCAPTCHA.

first signup for google recaptcha by visiting ::
add one of your website domain there  and  get sitekey and secret key  , on that domain settings page goto bottom of page and  click Advance Settings  then you will see Domain Name Validation heading and with it you will see checkbox :: Verify the origin of reCAPTCHA solutions    , so uncheck that checkbox and save settings.

so to upgrade phpmyadmin to latest version check :: 

once you have latest version of phpmyadmin or above 4.5  then login to ssh and edit


cd /usr/share/phpmyadmin/
nano /
vim /   # if nano is not installed try to edit with vim
cp   # if no file is there then run it will create file then edit it with nano or vim

in file add these two lines somewhere top or bottom or middle or below $cfg[‘blowfish_secret’]

$cfg['CaptchaLoginPublicKey'] = 'paste here site key here you get from google in above step';
 $cfg['CaptchaLoginPrivateKey'] = 'paste here secret key you get from google in above step ';

save it , and logout from phpmyadmin now you will see google recaptcha on login screen


Supporter Answered on December 1, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.