All Recipes
144 recipes available
Install WP CLI -- The WordPress Command Line Interface
See https://wp-cli.org
sudo -u forge -i -- wp
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
Install SOAP on PHP 7 enabled servers
By default, forge doesn't install the Soap client with its PHP setup.
sudo apt-get install php7.0-soap
Install SOAP on PHP 7 enabled servers
By default, forge doesn't install the Soap client with its PHP setup.
sudo apt-get install php7.0-soap
Install ElasticSearch 2.x
Forked from @artisangoose Recipe #70; updated Elasticsearch version, update: oracle-java8
echo ">> Installing Elastic GPG Key"
wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add -
echo ">> Adding deb package"
Create a MySQL User with All Privileges
echo "Creating 'username' MySQL User..."
PASS=false
Enable PHP7 Short Open Tag
declare -A replacers
replacers[short_open_tag]=On
#replacers[upload_max_filesize]=240M
Allow WWW and Non-WW
Tell NGINX to use both www and non-www buy adding the www/non-www version of the url to to the NGINX config file for the site.
server {
listen 80;
listen [::]:80;
server_name YOUR-SITE.COM www.YOUR-SITE.COM;
Redirect www to non-www
# Add this before every nginx configuration you make
server {
server_name www.example.com;
return 301 $scheme://example.com$request_uri;
Remove Old Packages (Unattended)
This Forge Recipe will remove all old, non-required packages and bypass all prompts.
apt-get -y autoremove
Update & Upgrade (Unattended)
This Forge recipe will update everything. It will bypass all prompts and will also automatically use current configuration files instead of rewriting them.
apt update
apt upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
Update Guzzle to Patch Proxy Header Vulnerability (Unattended)
This Forge recipe will update Guzzle (along with all dependencies). It will bypass all prompts and will also automatically use current configuration files instead of rewriting them.
apt upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" php-guzzle
Create stage and production MySQL databases
Feel free to modify user privileges.
mysql -p
expect 'Enter password:'
send 'YOUR FORGE DB PASS HERE'
CREATE DATABASE IF NOT EXISTS stage