PuPHPet and Drupal
After reading about PuPHPet on Sitepoint I set up a virtual machine with a dev site in Drupal 8. Unfortunately the site proved to be very slow to respond.
NFS was the main issue (as described on stackoverflow.
PuPHPet settings
Deploy Target
Local VM Details
Local VM Memory
Enter: 1024
Sharing Folders with Local VM
Shared Folder Type
Choose NFS
I’m using a MacBookPro and can use NFS for speed as described here: https://groups.drupal.org/node/270828. Read the Vagrant documentation.
PHP
Install Composer
PHP Libraries
Drush
https://www.drupal.org/node/961012 recommends realpath_cache_size = 16M
INI Settings
allow_url_fopen = Off
error_reporting = E_ALL
expose_php = Off
ignore_repeated_errors = On
ignore_repeated_source = On
post_max_size = 10M
realpath_cache_size = 16M
session.save_path = /var/lib/php/session
PHP modules:
cli
gd
intl
mcrypt
tidy
mbstring
MySQL
After running vagrant up
I logged in to update the MySQL settings
login with:
vagrant ssh
Edit my.cnf
sudo vi /etc/my.cnf
As recommended on https://www.drupal.org/node/259580 I updated my.cnf
[mysqld]
basedir = /usr
bind-address = 127.0.0.1
datadir = /var/lib/mysql
expire_logs_days = 10
key_buffer_size = 64M
log-error = /var/log/mysqld.log
max_allowed_packet = 64M
max_binlog_size = 100M
max_connections = 151
myisam_recover = BACKUP
pid-file = /var/run/mysqld/mysqld.pid
port = 3306
query_cache_limit = 32M
query_cache_size = 32M
skip-external-locking
socket = /var/lib/mysql/mysql.sock
ssl = false
ssl-ca = /etc/mysql/cacert.pem
ssl-cert = /etc/mysql/server-cert.pem
ssl-key = /etc/mysql/server-key.pem
thread_cache_size = 8
thread_stack = 256K
tmpdir = /tmp
user = mysql
skip-name-resolve
innodb_buffer_pool_size = 384M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 10M
innodb_log_buffer_size = 64M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 180
Restart MySQL
sudo /etc/init.d/mysqld restart