Home VestaCP Change VestaCP phpMyAdmin Default URL

Change VestaCP phpMyAdmin Default URL

By default your VestaCP phpMyAdmin URL structure is like this: your-ip/phpmyadmin or if you use your domain name then it would be like this: yourdomainname.com/phpmyadmin.

But that’s not pretty safe though, because people widely know about this form of VestaCP default phpMyAdmin URL. And by that would ease outsider with bad intention to do nasty work with your stuff in phpMyAdmin using some kind of bruteforce login (Repeatedly login using bots).
Change VestaCP phpMyAdmin URL
But don’t worry because you can change the URL to keep your phpMyAdmin secure, just follow the guides below:

  1. Login to your SSH using PuTTY client for Windows, then enter your IP Address on the Host Name or IP Address column, then click on Open.
    Note: If you already have changed your port number to 65001, be sure to enter it. If not, then leave it as 22. See how to change VestaCP SSH port.
  2. Type root as username then paste your password by right clicking then click Enter on your keyboard. For this post I use mysecret as the URL.
  3. So I will use the following code to change my phpMyAdmin URL:
    sed -i 's#Alias /phpmyadmin /usr/share/phpMyAdmin#Alias /mysecret /usr/share/phpMyAdmin#g' /etc/httpd/conf.d/phpMyAdmin.conf
    sed -i 's#Alias /phpMyAdmin /usr/share/phpMyAdmin#Alias /mysecret /usr/share/phpMyAdmin#g' /etc/httpd/conf.d/phpMyAdmin.conf

Of course you can use any word you like, just change mysecret with your desired word (s).

  1. To complete the process just restart your Apache using the following command:
    systemctl restart httpd

    Or use the following command:

    service httpd restart

Now to test if the URL is changed just open the youripaddress/phpmyadmin or yourdomainname.com/phpmyadmin, if it’s showing not found page then it works.

Then you can reload your browser using the new URL which is yourdomainname.com/mysecret or youripaddress/mysecret.

Change VestaCP phpMyAdmin URL MySecret.png

You can also find more VestaCP tutorials to help you dealing with this control panel software.


Please enter your comment!
Please enter your name here