the enterprise wor/d/thy/press
TRANSCRIPT
![Page 1: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/1.jpg)
THE ENTERPRISE WOR/D/THY/PRESS
![Page 2: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/2.jpg)
THE FAMOUS 5-MINUTE INSTALLATION
WORDPRESS
![Page 3: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/3.jpg)
BUT WHAT ABOUT MAINTENANCE?
WORDPRESS
![Page 4: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/4.jpg)
IS THE ADMIN THE BEST PLACE?
MANAGE THEMES & PLUGIN VERSIONS?
WORDPRESS
![Page 5: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/5.jpg)
CHANGES OR NEW FUNCTIONALITY
HOW DO YOU TEST OR DEVELOP?
WORDPRESS
![Page 6: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/6.jpg)
WITH MINIMAL DOWNTIME
AND WHAT ABOUT DEPLOYING?
WORDPRESS
![Page 7: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/7.jpg)
FOR THE BEST USER EXPERIENCE
IT NEEDS TO BE FAST!
WORDPRESS
![Page 8: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/8.jpg)
DEVOPS CLI FRONTEND SEARCH
![Page 9: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/9.jpg)
DEVOPS CLI FRONTEND SEARCH
![Page 10: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/10.jpg)
WE NEED FULL CONTROL OF DEV & OPS
![Page 11: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/11.jpg)
TO DEPLOY TO MULTIPLE ENVIRONMENTS
DEPENDENCY MANAGEMENT
![Page 12: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/12.jpg)
FOR CONSISTENT ENVIRONMENTS
AUTOMATION
![Page 13: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/13.jpg)
DEV DEPENDENCY MANAGEMENT
![Page 14: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/14.jpg)
GETCOMPOSER.ORG
COMPOSER
DEPENDENCY MANAGEMENT
![Page 15: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/15.jpg)
PHP PACKAGE REPOSITORY
PACKAGIST.ORG
DEPENDENCY MANAGEMENT
![Page 16: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/16.jpg)
CUSTOM PATHS DEFINITIONS
COMPOSER INSTALLERS
DEPENDENCY MANAGEMENT
![Page 17: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/17.jpg)
COMPOSER’ED’ PLUGIN & THEME MIRROR OF WORDPRESS.ORG
WPACKAGIST.ORG
DEPENDENCY MANAGEMENT
![Page 18: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/18.jpg)
NOT SUPPORTED IN WORDPRESS CORE :(
COMPOSER
DEPENDENCY MANAGEMENT
![Page 19: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/19.jpg)
GITHUB.COM/JOHNPBLOCH/WORDPRESS
BUT THERE IS A SOLUTION
DEPENDENCY MANAGEMENT
![Page 20: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/20.jpg)
DEPENDENCY MANAGEMENT
{ "name": "epwp/wordpress", "type": "project", "require": { "php": ">=7.0", "johnpbloch/wordpress": "4.6.1" }, "extra": { "wordpress-install-dir": "custom/path" } }
![Page 21: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/21.jpg)
1 . 2 . 3 MAJOR . MINOR . PATCH
BC-BREAKS . FEATURES . FIXES
SEMVER
DEPENDENCY MANAGEMENT
![Page 22: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/22.jpg)
~ 1 . 2 . 3 ^ 1 . 2 . 3
VERSIONING
DEPENDENCY MANAGEMENT
![Page 23: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/23.jpg)
ROOTS.IO/BEDROCK
BEDROCK
BEDROCK
![Page 24: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/24.jpg)
BEDROCK
├── composer.json ├── config │ ├── application.php │ └── environments │ ├── development.php │ ├── staging.php │ └── production.php ├── vendor └── web ├── app │ ├── mu-plugins │ ├── plugins │ ├── themes │ └── uploads ├── wp-config.php ├── index.php └── wp
![Page 25: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/25.jpg)
NEVER HARDCODE OR STORE VARIABLES
WP-CONFIG CHANGES
BEDROCK
![Page 26: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/26.jpg)
BEDROCK
/** * Use Dotenv to set required environment variables * and load .env file in root */ $dotenv = new Dotenv\Dotenv($root_dir); if (file_exists($root_dir . '/.env')) { $dotenv->load(); $dotenv->required( [ 'DB_NAME', 'DB_USER', 'DB_PASSWORD', 'WP_HOME', 'WP_SITEURL' ] ); }
![Page 27: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/27.jpg)
OPS AUTOMATION
![Page 28: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/28.jpg)
PROVISIONING, CONFIGURATION & DEPLOYMENT
ANSIBLE
AUTOMATION
![Page 29: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/29.jpg)
IN YAML FORM
PLAYBOOKS
AUTOMATION
![Page 30: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/30.jpg)
AUTOMATION
--- - hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: ensure apache is at the latest version yum: name=httpd state=latest - name: write the apache config file template: src=/srv/httpd.j2 dest=/etc/httpd.conf notify: - restart apache - name: ensure apache is running (and enable it at boot) service: name=httpd state=started enabled=yes handlers: - name: restart apache service: name=httpd state=restarted
![Page 31: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/31.jpg)
DOCS.ANSIBLE.COM/ANSIBLE/
MODULES
AUTOMATION
![Page 32: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/32.jpg)
COMMUNITY ROLE MANAGER
ANSIBLE GALAXY
AUTOMATION
![Page 33: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/33.jpg)
AUTOMATION
- name: composer src: geerlingguy.composer version: 1.2.7
- name: ntp src: resmo.ntp version: 0.3.0
- name: logrotate src: nickhammond.logrotate version: fc3ea4
![Page 34: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/34.jpg)
FOR SENSITIVE DATA ENCRYPTION
ANSIBLE VAULT
AUTOMATION
![Page 35: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/35.jpg)
AUTOMATION
vi file_with_passwords.yml
==
ansible-vault edit file_with_password.yml
![Page 36: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/36.jpg)
.VAULT_PASS NOT UNDER VERSION CONTROL
KEEP YOUR KEY PRIVATE
AUTOMATION
![Page 37: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/37.jpg)
ANSIBLE-PLAYBOOK DEPLOY.YML -E ENV=<ENV> -E SITE=<SITE>
DEPLOY WITH CONFIDENCE
AUTOMATION
![Page 38: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/38.jpg)
ROOTS.IO/TRELLIS
TRELLIS
TRELLIS
![Page 39: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/39.jpg)
FOR LOCAL DEVELOPMENT
VAGRANT
AUTOMATION
![Page 40: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/40.jpg)
§ Nginx § MariaDB § PHP 7.0 § Composer § WP-CLI § LetsEncrypt SSL § Page caching like Varnish § Data caching in memory § Ops best practices
TRELLIS
![Page 41: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/41.jpg)
TRELLIS
epwp.com/ # → Root folder for the project ├── trellis/ # → Automation, provision, deployment └── site/ # → A Bedrock-based WordPress site └── web/ ├── app/ # → WordPress content directory └── wp/ # → WordPress core (don't touch!)
![Page 42: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/42.jpg)
DIY LET’S BOOTSTRAP THIS!
![Page 43: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/43.jpg)
TRELLIS
mkdir epwp.com
cd epwp.com
git clone https://github.com/jvandijk/epwp-trellis.git trellis
git clone https://github.com/jvandijk/epwp-site.git site
![Page 44: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/44.jpg)
DEVOPS CLI FRONTEND SEARCH
![Page 45: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/45.jpg)
FASTER ADMINISTRATION OF WORDPRESS
WP CLI
WP-CLI
![Page 46: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/46.jpg)
WP-CLI
vagrant@epwp:/srv/www/epwp.com/current$ wp cli info
PHP binary: /usr/bin/php7.0 PHP version: 7.0.11-2+deb.sury.org~xenial+2 php.ini used: /etc/php/7.0/cli/php.ini WP-CLI root dir: phar://wp-cli.phar WP-CLI packages dir: /home/vagrant/.wp-cli/packages/ WP-CLI global config: WP-CLI project config: /srv/www/epwp.com/current/wp-cli.yml WP-CLI version: 0.24.1
![Page 47: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/47.jpg)
TO EXECUTE DIRECT DATABASE QUERIES
WP DB
WP-CLI
![Page 48: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/48.jpg)
MIGRATE YOUR DATA
WP EXPORT & IMPORT
WP-CLI
![Page 49: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/49.jpg)
MODIFY CONTENT
WP SEARCH-REPLACE
WP-CLI
![Page 50: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/50.jpg)
INSTALL, CHECK-UPDATE, MULTISITE CHANGE
WP CORE
![Page 51: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/51.jpg)
INSTALL, CHECK-UPDATE, MULTISITE CHANGE
WP CORE
![Page 52: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/52.jpg)
`WP PACKAGE BROWSE` FOR MORE OSS CLI EXTENSIONS
WP CLI PACKAGES
WP-CLI
![Page 53: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/53.jpg)
GENERATE CODE ACCORDING TO BEST PRACTICES
WP SCAFFOLD
SCAFFOLDING
![Page 54: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/54.jpg)
GENERATE CODE FOR PLUGIN
WP SCAFFOLD PLUGIN <SLUG>
SCAFFOLDING
![Page 55: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/55.jpg)
GENERATE CODE FOR A CUSTOM POST TYPE
WP SCAFFOLD POST-TYPE <SLUG>
SCAFFOLDING
![Page 56: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/56.jpg)
GENERATE THE CODE FOR A TAXONOMY
WP SCAFFOLD TAXONOMY <SLUG> —POST-TYPES=<A,B>
SCAFFOLDING
![Page 57: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/57.jpg)
IMPLEMENT PLUGIN
<?php /* Plugin Name: My WP extension Plugin URI: https://www.a-wp-site.com/ Description: WordPress extension Version: 1.0.0 Author: Enrise Author URI: https://www.enrise.com */ require_once('src/Bootstrap.php');
new \Bootstrap::getInstance();
![Page 58: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/58.jpg)
IMPLEMENT PLUGIN
public static function getInstance() { if ( ! ( self::$instance instanceof self ) ) { self::$instance = new self(); }
return self::$instance; }
protected function __construct() { add_action( 'plugins_loaded', [ $this, 'doYourThing' ], 100 ); }
public function doYourThing() { // trigger your scaffolded code from here return; }
![Page 59: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/59.jpg)
LIST, SEARCH, INSTALL, ACTIVATE, UPDATE
WP PLUGIN
3RD PARTY PLUGIN
![Page 60: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/60.jpg)
LIST, SEARCH, INSTALL, ACTIVATE, UPDATE
WP PLUGIN
3RD PARTY PLUGIN
![Page 61: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/61.jpg)
TO LOCK ON A VERSION
COMPOSER REQUIRE WPACKAGIST-PLUGIN/SLUG
3RD PARTY PLUGIN
![Page 62: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/62.jpg)
ADVANCEDCUSTOMFIELDS.COM
LET’S EXTEND THAT CUSTOM POST TYPE
CUSTOM FIELDS
![Page 63: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/63.jpg)
COMPOSER REQUIRE WPACKAGIST-PLUGIN/ADVANCED-CUSTOM-FIELDS
ADVANCED CUSTOM FIELDS
CUSTOM FIELDS
![Page 64: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/64.jpg)
WILL BE STORED IN DATABASE
DESIGN CUSTOM FIELD ADDITIONS IN THE ADMIN
CUSTOM FIELDS
![Page 65: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/65.jpg)
UNFORTUNATELY NO DIRECT SCAFFOLDING
EXPORT CUSTOM FIELDS TO PHP
CUSTOM FIELDS
![Page 66: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/66.jpg)
DEVOPS CLI FRONTEND SEARCH
![Page 67: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/67.jpg)
DECOUPLED CMS
GOING HEADLESS
![Page 68: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/68.jpg)
NO MONOLITH STRATEGY
SCALING UP
![Page 69: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/69.jpg)
TRANSPILE TO SUPPORT OLDER TECHNOLOGIES
BLEEDING EDGE JAVASCRIPT & CSS
![Page 70: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/70.jpg)
START USING IT TODAY!
ECMASCRIPT 2016
![Page 71: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/71.jpg)
NPM INSTALL ESLINT —SAVE-DEV
ESLINT
![Page 72: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/72.jpg)
NPM INSTALL ESLINT-CONFIG-AIRBNB —SAVE-DEV
ESLINT-CONFIG-AIRBNB
![Page 73: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/73.jpg)
.ESLINTRC
{ "root": true, "extends": "airbnb", "globals": { "wp": true }, "parser": "babel-eslint", "rules": { "react/jsx-filename-extension": [ 1, { "extensions": [".js", ".jsx"] } ], } }
![Page 74: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/74.jpg)
TRANSPILE DOWN TO ECMASCRIPT 5
BABEL JS
![Page 75: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/75.jpg)
MODULE BUNDLER
WEBPACK
![Page 76: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/76.jpg)
COMPONENT BASED STRATEGY
src/components/blocks/Logo/├── Logo.css├── Logo.js├── package.json└── logo.svg
![Page 77: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/77.jpg)
EXTRACT-TEXT, FILE-LOADER, URL-LOADER
WEBPACK PLUGINS
![Page 78: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/78.jpg)
AUTO RELOAD ON EVERY CODE CHANGE
WEBPACK HOT MIDDLEWARE
![Page 79: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/79.jpg)
DESIGN IN MULTIPLE BROWSERS SIMULTANEOUS
BROWSER SYNC
![Page 80: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/80.jpg)
DEVELOPER EXPERIENCE
![Page 81: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/81.jpg)
COMPLETE DECOUPLE THE FRONTEND
WORDPRESS REST API
![Page 82: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/82.jpg)
COMPOSER REQUIRE WP-API/WP-API
WORDPRESS REST API
![Page 83: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/83.jpg)
USE THE POWER OF AMAZON S3
MEDIA STORAGE
![Page 84: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/84.jpg)
COMPOSER REQUIRE HUMANMADE/S3-UPLOADS
MEDIA STORAGE
![Page 85: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/85.jpg)
ARE YOU READY?
NOW LET’S START SETTING UP
![Page 86: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/86.jpg)
SERIOUSLY?
![Page 87: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/87.jpg)
LET’S NOT REINVENT THE WHEEL..
SERIOUSLY?
![Page 88: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/88.jpg)
ROOTS.IO/SAGE
SAGE
![Page 89: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/89.jpg)
§ Sass for stylesheets § ES6 for JavaScript § Webpack for compiling assets, optimizing images, and
concatenating and minifying files § BrowserSync for synchronized browser testing § Bootstrap 4 for a front-end framework § Template inheritance
SAGE
![Page 90: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/90.jpg)
TEMPLATE STRUCTURE
$ tree templates templates ├── 404.php ├── index.php ├── layouts │ └── base.php ├── page.php ├── partials │ ├── content-page.php │ ├── content-single.php │ ├── content.php │ ├── entry-meta.php │ ├── footer.php │ ├── head.php │ ├── header.php │ ├── page-header.php │ └── sidebar.php ├── single.php └── template-custom.php
![Page 91: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/91.jpg)
composer create-project roots/sage your-theme-name 9.0.0-alpha.3
![Page 92: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/92.jpg)
DEVOPS CLI FRONTEND SEARCH
![Page 93: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/93.jpg)
WE NEED SOME DATA!
SMALL INTERMEZZO
FAKE DATA
![Page 94: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/94.jpg)
GITHUB.COM/FZANINOTTO/FAKER
FAKER
FAKE DATA
![Page 95: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/95.jpg)
EXPRESSIVE FIXTURES GENERATOR
ALICE
FAKE DATA
![Page 96: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/96.jpg)
WP PACKAGE INSTALL TRENDWERK/FAKER
WP CLI FAKER
FAKE DATA
![Page 97: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/97.jpg)
FAKE DATA
Trendwerk\Faker\Post: session{41..80}: post_content: <realText(600, 4)> post_title: '<sentence()>' post_type: 'session' post_date_gmt: <(gmdate('Y-m-d H:i:s', (time() - (rand(1, 5) * 86400) + ( rand(1, 8) * 3600))))> meta: date: <(gmdate('Ymd', strtotime(@self->post_date_gmt)))> start_time: <(strtotime(@self->post_date_gmt) - (strtotime(@self-> post_date_gmt) % 3600))> # end the session an hour later end_time: <(3600 + strtotime(@self->post_date_gmt) - (strtotime(@self-> post_date_gmt) % 3600))> speakers: <(array((string)((int)$this->valueForCurrent - 40 + 10)))> terms: location: <terms('location', 1)>
![Page 98: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/98.jpg)
WP FAKER FAKE YOUR-FILE.YML
GENERATE THE DATA
FAKE DATA
![Page 99: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/99.jpg)
DISTRIBUTED FULL TEXT SEARCH ENGINE
ELASTICSEARCH
SEARCH
![Page 100: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/100.jpg)
CONSISTENCY - AVAILABILITY - PARTITION TOLERANCE
NOSQL DATABASE
SEARCH
![Page 101: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/101.jpg)
HTTP JSON API
RESTFUL INTERFACE
SEARCH
![Page 102: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/102.jpg)
SEARCH
RDBMS ELASTICSEARCH
DATABASE INDEX
TABLE TYPE
ROW DOCUMENT
![Page 103: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/103.jpg)
DEFINING YOUR STRUCTURE
MAPPING
SEARCH
![Page 104: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/104.jpg)
"your-index" : { "mappings" : { "post" : { "properties" : { "post_content" : { "type" : "string" }, "post_date" : { "type" : "date", "format" : "YYYY-MM-dd HH:mm:ss", "include_in_all" : false }, "post_title" : { "type" : "string", "store" : true, "fields" : { "raw" : { "type" : "string", "index" : "not_analyzed" }, "sortable" : { "type" : "string", "analyzer" : "ewp_lowercase" } }, ...
![Page 105: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/105.jpg)
ANALYZED VS NOT ANALYZED
SEARCH
![Page 106: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/106.jpg)
COMPOSER REQUIRE WPACKAGIST-PLUGIN/ELASTICPRESS
ELASTICPRESS
SEARCH
![Page 107: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/107.jpg)
SEARCH
define('EP_HOST', env('EP_HOST')); define('ES_SHIELD', env('ES_SHIELD'));
wp elasticpress index --setup
![Page 108: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/108.jpg)
SEAMLESS FOR WORDPRESS SEARCH
INTEGRATES WITH WP_QUERY
SEARCH
![Page 109: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/109.jpg)
SEARCH
new WP_Query( [ 'ep_integrate' => true, 'post_type' => 'post', 'posts_per_page' => 20, ] );
![Page 110: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/110.jpg)
./DEPLOY.SH PRODUCTION EPWP.COM
RUNNING IN PRODUCTION
DEPLOY
![Page 111: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/111.jpg)
§ initialize - creates the site directory structure § update - clones the Git repo onto the remote server § prepare - prepares the files in the new release path § build - builds the new release § share - symlinks shared folders to new release § finalize - finalizes the deploy by updating the symlink
ADD YOUR DEPLOY HOOKS IN DEPLOY.YML
![Page 112: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/112.jpg)
DEVOPS CLI FRONTEND SEARCH
![Page 113: The Enterprise Wor/d/thy/Press](https://reader034.vdocuments.us/reader034/viewer/2022051709/5872baed1a28ab523c8b7909/html5/thumbnails/113.jpg)