Unfortunately I don't have the time to upkeep this project or provide updates for issues. I'd recommend using Carl Alexander's DebOps for WordPress project which does the same thing as this project. You can find it here:
https://github.com/carlalexander/debops-wordpress
Click here for the basic version
This Ansible Playbook is designed to setup a Mercury-Like environment on a Production server without the configuration hassle. This playbook was forked from WPEngine's Mercury Vagrant. It includes the ability to install multiple hostnames and installs of WordPress on one server super easily.
Note: Remember not to run weird scripts on your server as root without reviewing them first. Please review this playbook to ensure I'm not installing malicious software.
This Playbook will setup:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ansible/ansible
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install ansible git
git clone https://github.com/zach-adams/hgv-deploy-full/
hgv-deploy-full
hosts
file and change yourhostname.com
to your host name. If you have more than one website that you want to install on this server add each on a new line.yourhostname.com
file in the host_vars
folder to your hostname. If you have more than one website that you want to install on this server copy the current one and name it the hostname of the website.host_vars
directorysudo ansible-playbook -i hosts playbook.yml -c local
. If you have any errors please open a new issue in this repository.rm -rf hgv-deploy-full/
/usr/bin/mysql_secure_installation
to install MySQL and secure it. Your root password will be blank by defaultsudo service varnish restart && sudo service nginx restart
This only works on sites that were installed using the method above. Always backup your server before running code that could break it.
hosts
file follow the same steps however do not include any previous installations of WordPress or hostnames, only list the new ones you want.host_var
folderIf you are having issues making changes or having issues with the backend while using Varnish, you can turn it off and just use Nginx while maintaining good performance. Here's how you can do that:
sudo nano /etc/nginx/sites-available/your-hostname.com
listen = 8080;
to listen = 80;
sudo service varnish stop && sudo service nginx restart
Your Nginx configuration should automatically facilitate switching to PHP-FPM if there's an issue with HHVM, however if you want to switch back manually you can do so like this:
vim|emacs|nano /etc/nginx/sites-available/( Your Hostname )
location ~ \.php$ {
proxy_intercept_errors on;
error_page 500 501 502 503 = @fallback;
fastcgi_buffers 8 256k;
fastcgi_buffer_size 128k;
fastcgi_intercept_errors on;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass hhvm;
}
fastcgi_pass hhvm;
to fastcgi_pass php;
sudo service nginx restart
phpinfo();
Please report any issues through GitHub or email me at zach@zach-adams.com and I'll do my best to get back to you!