You can change php version from virtual machine. Connect to vagrant
vagrant ssh
if you want to change php to version 7.3 than execute this command
php73
Don't forget to run "vagrant provision"
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
We will be putting a new team on a project of ours that currently runs on PHP 5.6 and mysql 5.6. I am putting together the homestead box and haven't found a good way to set these versions IN THE Homestead.yaml file. I know I can go in there manually and put these packages in, but I need to be able to distribute only the Homestead.yaml file and not a list of instructions on how to downgrade everything. Here is what I have tried:
ip: "192.168.10.10"
memory: 8096
cpus: 2
provider: virtualbox
name: project_a
ssl: true
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/virtualmachines/projecta
to: /vagrant/projecta
sites:
- map: projecta.com
to: /vagrant/projecta/public
type: apache
php: "5.6"
databases:
- projecta
features:
- mariadb: false
- ohmyzsh: false
- webdriver: false
- mysql8: false
- php7: false
But it still installs MYSQL 8 and PHP 7.
Is there any way of doing this without manually installing these package requirements or downgrading vagrant (our developers have many vagrant projects)?
Please or to participate in this conversation.