Skip to content

MannyAdumbire/wordpress-develop-arm

 
 

Repository files navigation

WordPress Develop for ARM

Who is this fork for?

This fork of wordpress-develop is compatible with ARM processors, specifically Apple Silicon chips like M1 and M2.

Usage is nearly identical to the original project (README.md).

Main differences as compared with the original project:

  • Docker services use arm image builds.
  • WPCLI is bundled into the PHP image, as opposed to running in seperate container. See Notes.
  • Support for multiple server names with shared certificates ( no more browser HTTPS CA error headaches ).

Whether you want to contribute to WordPress core or test your own projects against bleeding edge of WordPress, the mods in this fork should speed up your time to code.

Configuration

Nginx

ServerNames

You can create multiple test servers to run simultaneosly on the nginx container. To create 2 servers, for example, set the SERVER_NAMES env variable. E.g. indocker-compose.override.yml:

services:
  wordpress-develop:
    environment:
      SERVER_NAMES: 'wpdev1.local wpdev2.local'

Certificates

To enable HTTPS, create public and private certificate key pair at the following locations, using mkcert:

  • Replace contents of tools/local-env/devunstuck-key.pem with private Key.
  • Replace contents of tools/local-env/devunstuck.pub with public Key.

If you choose to rename the keys with your own custom key pair name, remember to also:

  • Update the relevant volumes: entries in wordpress-develop service.
  • Updatessl_certificate_key and ssl_certificate in the nginx conf file tools/local-env/default.conf/default.template to match.
    ...
    ssl_certificate /root/custom-key-pair-name;
    ssl_certificate_key /root/custom-key-pair-name;
    ...
    

Notes

PHP

The custom PHP image(devunstuck / php-xdebug-wpcli-arm) may be the biggest difference between this fork and the original project. The image is based on php - Official Image, and can be used in similar fashion.

Includes:

  • WP-CLI
    • The official wordpressdevelop/cli image doesn't have a ARM compatible version. Rather than running as a seperate container, wpcli is installed directly within PHP container.
  • Xdebug
  • strace

WPCLI

To run wp commands, use the wp_php user. E.g. if the php container is named du-wordpress-develop-php-1, do:

docker exec -u wp_php du-wordpress-develop-php-1 wp help

Xdebug

Xdebug is enabled by default. Nginx and PHP are pre-configured to stay connected during very long xdebugging sessions.

Releases

No releases published

Packages

No packages published

Languages

  • PHP 79.1%
  • CSS 10.4%
  • JavaScript 8.9%
  • SCSS 0.9%
  • HTML 0.7%
  • XSLT 0.0%