Updating Local ENV to PHP7 + Xdebug

I was having a bit of trouble with this so I thought I would write a quick post on how to set this up. If you have a local vagrant that is running something like 5.6 and you need to update to 7 here are the steps you have to take.

SSH into your vagrant.

run these commands:


sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php libapache2-mod-php
sudo a2dismod php5
sudo a2enmod php7.1
sudo apt-get install php7.1-mysql
sudo apt-get install php7.1-xml
sudo service apache2 restart

Then for the xdebug part I found this particular article very helpful.

This article may also help you on your travels.