easyengine - command-line tool to manage wordpress sites on nginx

30
Easy ( WordPress + Nginx ) by rtCamp Mitesh Shah & Rahul Bansal

Upload: rtcamp

Post on 27-Jan-2015

123 views

Category:

Technology


6 download

DESCRIPTION

EasyEngine is a Command Line Tool to Manage WordPress Sites on Nginx Server. Apart from site management, it installs php, mysql, nginx, postfix, memcache and everything else required to run high traffic WordPress sites. You can serve millions of page-views on $5 digitalocean plan using EasyEngine! ;-) These slides are from WordCamp Mumbai 2014 session.

TRANSCRIPT

Page 1: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Easy ( WordPress + Nginx )

by rtCamp

Mitesh Shah & Rahul Bansal

Page 2: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Table of Contents1. Introduction

2. Motivation

3. Features

4. Inside EasyEngine

5. Roadmap

6. Getting Involved

7. Demo

2

Page 3: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

IntroductionHello World!

Page 4: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

EasyEngine is...• a command-line tool

• coded in shell scripting language

• "control-panel" for geeks/developers

• made for WordPress

• GPL like WordPress

4

Page 5: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

MotivationWhat annoyed lazy people!

Page 6: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

cPanel/Plesk ?#%!@• Bloated/Resource-Hog

• TOO many unwanted features

• NOT made 4 WordPress

6

Page 7: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Automation• Performance Optimization

• Debugging

• Maintainance

Anything that can go wrong — will go wrong!

Murphy's Law“

7

Page 8: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

InstallationWelcome to the Easy world!

Page 9: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Inside Shell...curl -sL rt.cx/ee | sudo bash

ee system install

ee site create example.com --wp

Simplicity is the ultimate sophistication!

William Gaddis

01.

02.

03.

9

Page 10: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Create "12" Types of WordPress Sites!Single Site Multisite with Subdir Multisite with Subdom

NO Cache --wp --wpsubdir --wpsubdom

WP Super Cache --wpsc --wpsc --wpsubdir --wpsc --wpsubdom

W3 Total Cache --w3tc --w3tc --wpsubdir --w3tc --wpsubdom

Nginx FastCGI Cache --wpfc --wpfc --wpsubdir --wpfc --wpsubdom

10

Page 11: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Features/UsageDriver's manual

Page 12: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

A Site includes...• PHP's Zend-Opcache

• Memcache for Object-Cache and DB-Cache

• Full Page-Cache

• Separate access and error logs

12

Page 13: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Site management...• Enable ee site enable example.com

• Disable ee site disable example.com

• Delete ee site delete example.com

• Info ee site info example.com

13

Page 14: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Debugging...• Debug system ee debug

• Debug site ee debug example.com

• Rewrites only ee debug example.com --rewrite

• Interactive ee debug example.com -i

14

Page 15: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Easy to learn...• Built-in help ee help

• Man pages man ee

• Autocompletion for commands and site-name

Never memorize something that you can look up!

Albert Einstein

15

Page 16: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Inside EasyEngineUnder The Hood

Page 17: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

How Quick Setup Works!• Prefer binary packages instead of compiling

• Prefer conventions over database

• Tweaks differnt configs at the time of installation only

17

Page 18: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

ConventionsFile structure for example.com site

• /var/www/example.com/ - All files related to example.com

• /var/www/example.com/htdocs/ - Document Root

• /var/www/example.com/logs/ - Logs

• /var/www/example.com/wp-config.php - WordPress config

• /etc/nginx/sites-available/example.com - Nginx config

Database details are used from wp-config.php

18

Page 19: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Git-based backupFor all configs

• /etc/nginx/

• /etc/php5/

• /etc/mysql/

• /etc/postfix/

If something goes wrong...

git checkout /path/to/config/file

19

Page 20: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Administrative ToolsPort 22222 for Web-based tools

• MySQL admin tools e.g. phpMyAdmin, adminer

• Debugging tools e.g. Anemometer, WebGrind

• Stats viewer for MemCache, PHP's Zend-OpCache

CLI...

• ee info

• ee site info

20

Page 21: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Logging• Installation log

• Site creation & other commands log

• Error log

Log Location: /var/log/easyengine/

21

Page 22: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Roadmap

Page 23: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Next few milestones...• Easy Debugging

• Automated Monitoring with Email Alerts

• Mail Server

• "Shared" Hosting Support

• Easy Migrations/Cloning

• Offsite/Peer backups

23

Page 24: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Beyond CLI...• REST API

• Web-based control panel

• Mobile Apps

24

Page 25: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Getting InvolvedFor "Easier"Engine!

Page 26: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

How you can help?• Coding

• Documentation

• Testing

• Help others move

• Spread the word

• Dontations! ;-)

26

Page 27: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Useful Links• Homepage https://rtcamp.com/easyengine/

• Docs https://rtcamp.com/easyengine/docs/

• Github https://github.com/rtCamp/easyengine

• Twitter https://twitter.com/easyengine

27

Page 28: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Demo!It's showtime!!!

Page 29: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

Q&ALet's talk!

Page 30: EasyEngine - Command-Line tool to manage WordPress Sites on Nginx

The End!Thanks :-)