PHPMyAdmin with Homestead

SSH into the Homestead vagrant box

vagrant ssh

Then cd into /home/vagrant/

cd /home/vagrant/

Get the .zip file from phpmyadmin.net/downloads by right clicking on the green "download v.v.v" (top right) button and copying the link. I have the 5.0.4 version. Use wget to download the zip into your /home/vagrant/ directory:

wget https://files.phpmyadmin.net/phpMyAdmin/5.0.4/phpMyAdmin-5.0.4-all-languages.zip

Unzip the file:

unzip phpMyAdmin-5.0.4-all-languages.zip

And rename the new extracted folder to phpmyadmin:

mv phpMyAdmin-5.0.4-all-languages phpmyadmin

A phpmyadmin folder is created: /home/vagrant/phpmyadmin/

Delete the .zip file:

rm phpMyAdmin-5.0.4-all-languages.zip


Exit your Homestead vagrant box:

exit


Open homestead.yaml (on your project root directory) and add these lines:

sites:
-
map: homestead.test
to: /home/vagrant/code/public
-
map: phpmyadmin.homestead.test
to: /home/vagrant/phpmyadmin


Open your /etc/hosts file with the command:

sudo nano /etc/hosts

and append the following lines:

192.168.10.10 homestead.test
192.168.10.10 phpmyadmin.homestead.test


If vagrant is already running run the command:

vagrant reload --provision


Now go to phpmyadmin.homestead.test on your browser.

The username is homestead, and your password is secret.

Comments (0)

Search Here