Skip to content

Instantly share code, notes, and snippets.

@aaronfrey
Last active November 2, 2020 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronfrey/0bbc667ac448ea29cf2c165214569415 to your computer and use it in GitHub Desktop.
Save aaronfrey/0bbc667ac448ea29cf2c165214569415 to your computer and use it in GitHub Desktop.

WordPress Documentation

  • NGINX >= 1.14
  • PHP >= 7.4
  • MySQL 5.6 or greater

Test Server

PHP Extensions

Required

  • curl – Performs remote request operations.
  • dom – Used to validate Text Widget content and to automatically configuring IIS7+.
  • exif – Works with metadata stored in images.
  • fileinfo – Used to detect mimetype of file uploads.
  • hash – Used for hashing, including passwords and update packages.
  • json – Used for communications with other servers.
  • mbstring – Used to properly handle UTF8 text.
  • mysqli – Connects to MySQL for database interactions.
  • libsodium – Validates Signatures and provides securely random bytes.
  • openssl – Permits SSL-based connections to other hosts.
  • pcre – Increases performance of pattern matching in code searches.
  • imagick – Provides better image quality for media uploads. See WP_Image_Editor is incoming! for details. Smarter image resizing (for smaller images) and PDF thumbnail support, when Ghost Script is also available.
  • xml – Used for XML parsing, such as from a third-party site.
  • zip – Used for decompressing Plugins, Themes, and WordPress update packages.

Recommended

  • filter – Used for securely filtering user input.
  • gd – If Imagick isn’t installed, the GD Graphics Library is used as a functionally limited fallback for image manipulation.
  • iconv – Used to convert between character sets.
  • mcrypt – Generates random bytes when libsodium and /dev/urandom aren’t available.
  • simplexml – Used for XML parsing.
  • xmlreader – Used for XML parsing.
  • zlib – Gzip compression and decompression.
  • ssh2
  • ftp
  • sockets (For when the ftp extension is unavailable)
  • ImageMagick – Required by Imagick extension
  • Ghost Script – Enables Imagick/ImageMagick to generate PDF thumbnails for the media library.

Virtual Machine / Hosting Requirments

Folder Structure

Bedrock

Requirements

  • PHP >= 7.1
  • Composer

Features

  • Provides separation of Wordpress vendorized code from application code.
  • Can use Composer to manage Wordpress sourcode and Wordpress plugins via WordPress Packagist.
  • Can use environment variables.
  • Don’t need to provide write access to the uploads folder (one of the main security concerns when using Wordpress).

Installation

  1. In the root of the project run $ composer create-project roots/bedrock .

Theme

Requirements

  • WordPress >= 4.7
  • PHP >= 7.1.3 (with php-mbstring enabled)
  • Composer
  • Node.js >= 8.0.0
  • Yarn

Features

  • Provides MVC code organization.
  • Introduces Laravel PHP framework as the engine to your Wordpress theme.
    • Logic and presentation separation via controllers, layouts, views and partials.
    • Laravel Blade templating language.
    • Support modern frontend development tools such as ES6, Webpack, and Bootstrap.

Windows Installation

  1. Install windows-build-tools globally. This will provide Python scripting.
  • Right click on PowerShell and run as administrator and run:
$ npm install --global --production windows-build-tools
  1. In the WordPress Themes folder run:
$ composer create-project roots/sage your-theme-name
  1. From within the newly created Sage theme folder run:
$ .\vendor\bin\sage meta
$ .\vendor\bin\sage config
$ .\vendor\bin\sage preset
  1. Install theme dependencies by running:
$ yarn

Setup

  • app/setup.php is used to enqueue stylesheets and scripts, register support for theme features with add_theme_support, and register navigation menus and sidebars.

Templates

  • How many templates will we be providing?
  • What are the standardized visual components we can provide?

Plugins

  • Advanced Custom Fields

    Note: We will need to track changes to ACF in version control.

  • Jetpack

    • Brute-force attack protection, spam filtering, and downtime monitoring.
    • Malware scanning, code scanning, and automated threat resolution.
    • A record of every change on your site to simplify troubleshooting.
    • Lazy image loading for a faster mobile experience.
    • Advanced site stats and analytics for understanding your audience.
    • SEO tools for Google, Bing, Twitter, Facebook, and WordPress.com to maximize your reach.
  • Wordfence Security

    • Comprehensive WordPress security solution.
  • Smush Image Compression and Optimization

    • Lossless Compression – Strip unused data without affecting image quality.
    • Lazy Loader – Defer offscreen images with the flip of a switch.
    • Incorrect Size Image Detection – Quickly locate images that are slowing down your site.
    • Unlimited & Free – Optimize all of your images up to 1MB in size forever (no daily, monthly, or annual caps).
  • W3 Total Cache

    • Extremely customizable caching plugin.
  • WP Maintenance Mode

    • Fully customizable Maintenance Mode in case the site ever goes down.
  • WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage

    • Automatically copies images, videos, documents, and any other media added through WordPress’ media uploader to Amazon S3, DigitalOcean Spaces or Google Cloud Storage.
    • Automatically replaces the URL to each media file with their respective Amazon S3, DigitalOcean Spaces or Google Cloud Storage URL.
    • Option to automatically remove the files from your server once they are copied to the bucket.
  • Yoast SEO

Reports

  • Who created last revision and when was it created?

Coding Standards

Test Driven Development (TDD)

Frameworks

Further Research

General Questions

  • How do we send a preview for revisions made to an existing page or post without pushing the changes live?

Trainings and Readings

Recommended

Required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment