Automation Scripts for WordPress — Part 1 EasyEngine

EasyEngine

Components and options

Installation Overview

Step 1. Open the Required Ports

  • Port 22/TCP (Inbound/Outbound) — Standard SSH port
  • Port 80/TCP (Inbound/Outbound) — Standard HTTP port
  • Port 443/TCP (Inbound/Outbound) — Standard HTTPS port
  • Port 22222/TCP (Inbound only) — EasyEngine admin tools port
  • Port 11371/TCP (Outbound only) — To connect to GPG Key Server
from-port-number/to-port-number
0.0.0.0/0

Step 2. Configure Your Domain and DNS

  • ‘A’ record with the host ‘@’ and the value of your servers public IP address
  • ‘CNAME’ record with the host ‘www’ and the value of the domain name

Step 3. Install EasyEngine

$ ssh your_user@your_server_ip
$ wget -qO ee rt.cx/ee && sudo bash ee

Step 4. Install your WordPress site

$ sudo ee site create an-example-domain.com --wpfc --php7
$ sudo ee site create an-example-domain.com --wpfc --php7  --user=new_user  --pass=new_user_password  --email=new-user@emailaddress.com
$ sudo wp option update blogname “Your Site Title” --allow-root
$ sudo wp option update blogdescription “Your site description” --allow-root
$ cd /var/run
$ sudo rm -rf nginx-cache
$ sudo service nginx restart

Step 5. Add Let’s Encrypt SSL for HTTPS

$ sudo ee site update an-example-domain.com --letsencrypt
$ sudo apt-get install -y software-properties-common
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install python-certbot-nginx
$ sudo certbot --nginx -d an-example-domain.com -d www.an-example-domain.com

Step 6. Configure Server Caching Plugins

Configure Memcached and Browser Caching with W3TC

Configure Nginx FastCGI Cache Purging with NGINX Helper

  • HIT — The page was returned from cached.
  • MISS — The page wasn’t returned from cache, but if you reload you should get a HIT as this caches the page.
  • BYPASS — The page is cached, but wasn’t returned from cache. (usually the case if you are logged in)

Other Useful Commands

Logging

$ ee log show an-example-domain.com
$ ee log show an-example-domain.com --nginx
$ ee log show an-example-domain.com --php
$ ee log show an-example-domain.com --access
$ ee log show an-example-domain.com --wp
$ ee log show --mysql
$ ee log show --fpm
$ ee log reset
$ ee log reset an-example-domain.com --nginx

Debugging

$ ee debug <option>
-i                     # Interactive debug
--nginx # Debug Nginx
--rewrite # Debug Nginx rewrite rules
--fpm # Debug FastCGI
--fpm7 # Debug FastCGI PHP 7.0
--php # Debug PHP
--php7 # Debug PHP 7.0
--mysql # Debug MySQL
--import-slow-log-interval # Import MySQL slow log to Anemometer
--all # Debug all server paramenters
$ ee debug an-example-domain.com <option>
-i                 # Interactive debug
--nginx # Debug Nginx
--rewrite # Debug Nginx rewrite rules
--wp # Debug WordPress
--all # Debug all site wide parameters

Summary

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Don’t fight your toolset!

AMP Recover Overview

Designing Enemies using Abstract Classes

Quick start on Bee Network

CS371p Spring 2021 Blog: Week of April 26 — May 2

Docker Container Resource Management: CPU, RAM and IO: Part 2

How to Monitor Air Temperature in a Frost Hollow, with no WIFI or Power

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Contribute to open source project using GitHub

Get Started with Git and GitHub

Heroku/Git pipeline Deployment Fails (504, Internal Server Error)

DAPP Demo Digital Signature Application part-1