Skip to main content
Image
Drupal VM

No doubt that Drupal VM is the most popular Vagrant and Ansible based environment for Drupal development. In the earlier versions it used to be little tricky to change the latest 7.1 version of php to 5.6 but now it is just a matter of changing [php_version] value.

Apart from changing the php version to 5.6 more extra config lines needed to be added to the config.yml file.

php_version: "5.6"
php_memory_limit: "192M"
php_display_errors: "On"
php_display_startup_errors: "On"
php_realpath_cache_size: "1024K"
php_sendmail_path: "/opt/mailhog/mhsendmail"
php_opcache_enabled_in_ini: true
php_opcache_memory_consumption: "192"
php_opcache_max_accelerated_files: 4096
php_max_input_vars: "4000"
php_packages:
  - php5
  - php5-mcrypt
  - php5-cli
  - php5-common
  - php5-curl
  - php5-dev
  - php5-fpm
  - php5-gd
  - php5-sqlite
  - php-pear
  - libpcre3-dev
php_conf_paths:
  - /etc/php5/fpm
  - /etc/php5/apache2
  - /etc/php5/cli
php_extension_conf_paths:
  - /etc/php5/fpm/conf.d
  - /etc/php5/apache2/conf.d
  - /etc/php5/cli/conf.d
php_fpm_daemon: php5-fpm
php_fpm_conf_path: "/etc/php5/fpm"
php_fpm_pool_conf_path: "/etc/php5/fpm/pool.d/www.conf"
php_mysql_package: php5-mysql

The recent version of Drupal VM 4 brings that facility of switching the PHP version just by changing the configuration value of the variable [php_version] and run [vagrant provision].

# PHP Configuration. Currently-supported versions: 5.6, 7.0, 7.1.
# See version-specific notes: http://docs.drupalvm.com/en/latest/other/php/
php_version: "7.0"

You can get the latest Drupal VM 4 @ GitHub Project and can go through official documentation.

1 minute