About
Easy Engine = Easy wordpress on Nginx
The above equation tells everything about easy engine. However I will make it a little bit clearer, easy engine is a shell script in Linux that makes it easy for installation and management of WordPress sites on Nginx (pronounced as engine-x). Nginx is a fast, lightweight, and open source web server that doubles up as a reverse proxy and load balancer. It is gaining popularity amongst most production servers.
Here I will show you how to host a wordpress site with easy engine and how to enable PHP v7.2 on easy engine. I am running all command as root user.
Step 1:
Install easyengine on your machine:
apt update wget -qO ee rt.cx/ee && bash ee
After the installation, we need to apply the bash auto-completion for EasyEngine ee command.
Run the following command.
source /etc/bash_completion.d/ee_auto.rc
Now easy engine is installed and we can create and manage our sites using the "ee" command.
Step 2:
Creating a simple html site with easy engine:
ee site create
Installing WordPress with Basic Configuration:
ee site create--wp
When it is completed you will get details of your wordpress site including WordPress admin user and password.
You will get the details like document root, log file locations and database details by running the following command:
ee site info
EasyEngine provides automatic WordPress cache settings for the following software:
--wpfc: Nginx Cache --w3tc: W3 Total Cache --wpsc: WP Super Cache --wpredis: WP Redis Cache
Install WordPress with Cache Settings:
ee site create--wpfc
Install WordPress with PHP 7.0:
ee site create--wpfc --php7
To install Wordpress with PHP 7.0, WordPress Cache, and SSL:
ee site create--wpfc --php7 --letsencrypt
Step 3:
If you want to setup SSL on an existing site:
ee site update--letsencrypt
If you get any error in this step refer step 5.
In case you want to change the wordpress admin password use the below command:
ee site update--password
Step 4:
Additional SSL Configuration
cd /var/www/your_domain/nginx vi ssl.conf
Add the 'ssl_ciphers' configuration:
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:AES256+EDH';
Restart the EasyEngine stack:
ee stack restart
Step 5:
If step 3 works well with your setup please avoid this step.
Adding SSL normally:
git clone https ://github.com/letsencrypt/letsencrypt && cd letsencrypt
./letsencrypt-auto -d
Enabling PHP 7.2 on EasyEngine:
Add php7.2 repository:
add-apt-repository ppa:ondrej/php apt update
Install php7.2-fpm and other necessary packages:
apt install php7.2-common php7.2-cli php7.2-zip php7.2-opcache php7.2-mysql php7.2-mbstring php7.2-json php7.2-intl php7.2-gd php7.2-fpm php7.2-curl php7.2-bz2 php7.2-bcmath php7.2-imap php7.2-recode php7.2-soap php7.2-xml php7.2-imagick php7.2-memcache php7.2-memcached php7.2-igbinary php7.2-msgpack php7.2-redis
Copy the php7.2-fpm pool configuration from php7.0-fpm:
cp -f /etc/php/7.0/fpm/pool.d/www.conf /etc/php/7.2/fpm/pool.d/www.conf
Edit the listening port of php7.2-fpm
vi /etc/php/7.2/fpm/pool.d/www.conf
Change the line
listen = 127.0.0.1:9070to
listen = 127.0.0.1:9090
Restart php-fpm service:
service php7.2-fpm restart
Then to use php7.2-fpm, replace globally php7.0-fpm with php7.2-fpm
vi /etc/nginx/conf.d/upstream.conf
Replace the line
server 127.0.0.1:9070;by
server 127.0.0.1:9090;
Then reload nginx:
service nginx restart
Then make a php72 configuration file in nginx folder:
cp /etc/nginx/common/php7.conf /etc/nginx/common/php72.conf
Replace the line
fastcgi_pass php7;by
fastcgi_pass php72;
Replace the line
include common/php7.conf;by
include common/php72.conf;in the site configuration file.
Reload nginx:
service nginx restart
Subscribe by Email
Follow Updates Articles from This Blog via Email

No Comments