The Magento 2 Cookbook is a project created and written by Ray Bogman & Vladimir Kerkhoff.

The following 8 chapters will give you a good overview on how to start working with Magento 2. More than 342 pages and 50 indepth Magento 2 recipes.

Install Magento 2 on Apache and Nginx

Installing Magento 2 is a total different ball game compared to Magento 1. Where Magento 1 could be installed thru FTP or SSH for an experienced webmaster is Magento 2 only installable via the command-line interface (SSH). A major change installing Magento is the need to use Composer. Currently Apache and Nginx are still one of the most used webservers to use with Magento.

  • Installing Magento 2 on Apache
  • Installing Magento 2 on Nginx
  • Installing PHP-PFM
  • Installing HHVM
  • Installing MySQL
  • Installing Magento 2
  • Installing Magento 2 on Hypernode
  • Managing Magento 2 on Docker

Magento 2 system tools

Managing Magento 2 via the command shell is new. Magento released a new powerful tool to manage and install sample data,reindex your database, backup your site or flush your caches are just a few of the options.

  • Installing Magento 2 sample data via GUI
  • Installing Magento 2 sample data via command-line
  • Managing Magento 2 indexes via command-line
  • Managing Magento 2 cache via command-line
  • Managing Magento 2 backup via command-line
  • Transferring your Magento 1 database to Magento 2

Enable performance in Magento 2

To really use the performance of Magento 2 you can enable different type of caching options. The basic caching for configuration and session can be stored in Redis. In Magento 2 the Full Page Cache (FPC) can be handled by Varnish to give your store a performance boost. But there are also external services that you can use as a cache.

  • Configuring Redis for configuration cache
  • Configuring Memcached for session caching
  • Configuring Varnish as the Full Page Cache
  • Configuring Magento 2 with Cloudflare
  • Configuration optimized images in Magento 2
  • Configuration Magento 2 with HTTP/2
  • Configuration Magento 2 performance testing

Create catalog and categories

Creating a Root catalog is one of the major elements of a Magento store before creating products. Creating the correct product type incl attributes is an important step in setting up a Magento store.

  • Creating a ROOT catalog
  • Creating subcategories
  • Managing attribute set
  • Creating products
  • Managing products in catalog grid

Managing your store

Managing your Magento store on a daily bases is important. Setting up the correct TAX rules, configuring inventory of creating customer groups are just a small example of managing your store.

  • Creating shipping and tax rules
  • Managing customer groups
  • Configuring inventory
  • Configuring currency rates
  • Managing advanced pricing

Creating a custom Magento 2 theme

Learn how to create your own theme, based on the Magento 2 Blank theme and how to use the fallback to create ‘seasonal variations’. Explains how the new theme is setup and where files are stored.

  • Creating a new theme
  • Configuring the fallback to a parent theme
  • Changing specific page handle with a layout update
  • Adding CSS/JS to pages
  • Creating variations of your theme
  • Defering js loading thru layout xml
  • Changing the template for a current block
  • Registering and activating your theme in your store

Create a Magento 2 extension (basics)

Learn how to create a basic extension for Magento 2 and the basic functions needed to use it in a Magento 2 installation. Contains a brief introduction to new methods introduced in the Magento 2 framework and examples how to create basic functions.

  • Initialising extension basics
  • Working with Database models
  • Creating tables using setup scripts
  • Creating a web route and controllers to display data
  • Creating system configuration fields
  • Creating a backend data grid
  • Creating a backend form to add/edit data

Create a Magento 2 extension (advanced)

Learn how to use advanced features within extensions for Magento 2. Also includes how to add unit-/functional tests as this is a new requirement for extensions listed on the new Magento Connect.

  • Using dependency injection to pass classes to your own class
  • Modifying output with the use of Plugins (Interceptions)
  • Creating your own .xml module config file
  • Creating your own product type
  • Working with service layers/contract
  • Creating a Magento CLI command option

Related article

Magento PWA Studio Production setup

Build your own Magento PWA Studio production setup using Nginx proxy.

Read more

Ray Bogman

Senior Business Solutions Architect - Magento, An Adobe Company