[WordPress] Change VCCW's PHP Version to 7.4

Wordpress
Wordpress

The VCCW environment I use to verify WordPress behavior had a different PHP version from production, so I aligned them.

Method

Change the PHP version installed in VCCW
The author of VCCW provides the method, so I followed it.

To apply it to an already running VCCW environment, log in to the guest OS with vagrant ssh and run the following command.

$ curl https://raw.githubusercontent.com/vccw-team/change-php-version/master/run.sh | bash -s -- 7.4

When you access http://vccw.test/phpinfo.php, you can see that it has changed.

Test Environment

vccw and WordPress 5.4 PHP 7.4
Host: Windows 10 1909 Vagrant 2.2.7+VirtualBox 6.1.4

Other Notes

To change the PHP version when building the VCCW environment, meaning from the beginning, create provision-post.sh in the same location as the Vagrant file, put the command above in it, and then run vagrant up. I did not know about provision-post.sh. If used properly, it looks like it could make many things more convenient.

Me
Me

I do have a staging environment, but being able to tinker locally with less friction is still convenient. Much appreciated.

php4.4 vccw
Sponsored links
Follow ☆Geha☆