• This repository has been archived on 09/May/2024
  • Stars
    star
    484
  • Rank 90,873 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 6 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ARCHIVED: A simple Docker based development environment for WordPress.

WP Local Docker

WP Local Docker is an easy to use Docker based local development environment for WordPress development that works on Mac, Windows, and Linux.

Support Level Release Version MIT License

Documentation

Introduction

WP Local Docker is an easy to use Docker based local development environment for WordPress development that works on Mac, Windows, and Linux. Any number of environments can be created and may run at the same time1, and requests will be routed appropriately to the correct environment based on the hostname specified during environment creation.

Each environment within WP Local Docker is powered by nginx, phpfpm, memcached, and if desired, elasticsearch. PHP versions 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, or 8.0 are all supported. Supporting all environments within WP Local Docker is a MySQL container to run all MySQL databases, WP Snapshots to easily push and pull snapshots of a WordPress installation, PHPMyAdmin to manage MySQL databases with a familiar UI, and mailcatcher to catch any mail sent from all environments.

In addition to the services required to run WordPress, WP Local Docker will also download and install WordPress as a single site installation, a Multisite with Subdirectories, a Multisite with Subdomains, or the core development version.


Prerequisites

WP Local Docker requires docker, docker-compose, Node, and npm. It is recommended that you use the latest versions of docker and docker-compose. Node 12 is the minimum version of node that is currently supported. While WP Local Docker may work with other versions of Node, compatibility is not guaranteed. We recommend using NVM to manage Node versions.

MacOS

Docker Desktop is available for download from the Docker website and will install docker-compose automatically. NodeJS and npm can be installed from the NodeJS website, via a package manager, such as Homebrew, or using a version manager, such as nvm.

NodeJS EACCESS Error

If Node was installed via the download from the NodeJS website, you will likely get an EACCESS error when trying to install global npm packages without using sudo. Npm has an article on preventing permission errors if you'd like to run the command without sudo. Alternatively, just run the install command with sudo.

Windows

Docker Desktop is available for download from the Docker website and will install docker-compose automatically. NodeJS and npm can be installed from the NodeJS website. You may also need Python 3.7+ and Visual Studio 2015 or newer with the β€œDesktop development with C++” workload.

It is recommended that you use the WSL/2 backend for Docker. You should use (nvm to install Node inside of your default Linux distro. Once you have, you can install WP Local Docker, from inside of Linux, following the installation instructions.

It is helpful to share git credentials between Windows and WSL/2. To do so, run the following, from inside of your default Linux, making sure to change USER-NAME to your Windows username:

git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe"
cd ~/.ssh
cp /mnt/c/Users/USER-NAME/.ssh/id_rsa* .
HTTPS on Windows

If https is not working in the browsers on Windows you will need to setup a shared root certificate. You will need mkcert installed inside WSL2 machine. With mkcert installed run:

mkcert -CAROOT

That will output the path to a certificate root directory which contains the rootCA.pem file you will need to share with Windows. List the directory path you got from the previous command:

ls /home/<user>/.local/share/mkcert

If there is no such directory or the directory is empty run:

mkcert -install

You will get output like:

Created a new local CA πŸ’₯
The local CA is now installed in the system trust store! ⚑️
The local CA is now installed in the Firefox trust store (requires browser restart)! 🦊

If there was no root certificate initially, you will need to regenerate the certificates for all the sites:

10updocker cert generate <yourwebsite.test>

Now there should be a rootCA.pem file in the root certicicate directory. Copy the rootCA.pem into any directory on Windows. In the Windows PowerShell set that directory as CAROOT environment variable:

$Env:CAROOT = "C:\path\to\directory\with\certificate"

Then install certificate in the Windows PowerShell with:

mkcert -install

You may need to install mkcert on Windows, or just use the latest executable from the releases page.

You will need to restart any open browsers for this change to take effect! That should fix the https issues.

Linux

Docker has platform specific installation instructions available for linux on their documentation site. Once docker is installed, you will need to manually install docker compose. NodeJS can be installed via a package manager for many linux platforms following these instructions.


Installation

Once all installation prerequisites have been met, WP Local Docker is installed as a global npm package by running npm install -g wp-local-docker. You can confirm it has been installed by running 10updocker --version.

Configuration

The first time you run a WP Local Docker command, default configuration settings will be used if you have not manually configured WP Local Docker beforehand. By default, WP Local Docker will store all environments within the ~/wp-local-docker-sites directory and try to manage your hosts file when creating and deleting environments. If you would like to customize the environment path or opt to not have WP Local Docker update your hosts file, run 10updocker configure and follow the prompts.

Updating

To update WP Local Docker, run npm install -g wp-local-docker again and NPM will install the latest version over your current one.


Using WP Local Docker

Create an Environment

10updocker create will present you with a series of prompts to configure your environment to suit your needs.

It is recommended that you use the .test top level domain (TLD) for your local environments, as this TLD is reserved for the testing of software and is not intended to ever be installed into the global Domain Name System. Additionally, WP Local Docker is configured to send any container to container traffic for .test TLDs directly to the gateway container, so that things like WP Cron and the REST API can work between environments out of the box.

Migrate a WP Local Docker V1 Environment

10updocker migrate <OLD_PATH> [NEW_ENV] will migrate an old standalone WP Local Docker environment into a new WP Local Docker V2 environment. Before running this command, create a new environment using the 10updocker create command.

OLD_PATH should be the path to the root of your old WP Local Docker environment.

NEW_ENV should specify what environment to import into. If omitted, you will be prompted to select from available environments

Example:

  • 10updocker migrate ~/sites/mysite

Migrate a WP Local Docker V2 Environment to v3

10updocker configure to update to the latest .wplocaldocker/global/docker-compose.yml and answer yes to Do you want to reset your global services configuration? This will reset any customizations you have made.

M1 Architecture consideration

To utilize the new M1 architecture optimised docker images on existing sites, edit the docker-compose.yml file to match a newly created on. Alternatively you can just create new sites and they will be optimised for M1 archtecture.

Delete an Environment

10updocker delete <hostname> will delete an environment with the given hostname. Any local files, docker volumes, and databases related to the environment will be deleted permanently.

A special hostname all is available that will delete all environments. You will be asked to confirm deletion of each environment.

Stop an Environment

10updocker stop <hostname> will stop an environment from running while retaining all files, docker volumes, and databases related to the environment.

A special hostname all is available that will stop all running environments as well as the global services.

Start an Environment

10updocker start <hostname> will start a preexisting environment.

A special hostname all is available that will start all environments as well as the global services.

Configure an Environment

An environment's config/ directory contains settings for various services:

  • elasticsearch/
    • elasticsearch.yml
  • nginx/
    • default.conf
    • develop.conf
    • server.conf
  • php-fpm/
    • docker-php-ext-xdebug.ini β€”Β this is equivalent to php.ini, and is where you should put settings that would be found in a file named php.ini, such as max_execution_time, memory_limit, xdebug.max_nesting_level, post_max_size, upload_max_filesize, and similar.
    • wp-cli.develop.yml
    • wp-cli.local.yml

After making changes to files in config/ or to docker-compose.yml, you must recreate the containers. Instructions for doing so can be found on this page under Restart an environment

Restart an Environment

10updocker restart <hostname> will restart all services associated with a preexisting environment.

A special hostname all is available that will restart all environments as well as the global services.

Restarting with 10updocker restart does not apply configuration changes. If you've made changes to an environment's docker-compose.yml or the files in /config directory, you will need to stop the environment (but not global services) and then run docker-compose up to recreate the containers:

  1. Navigate to the root directory of the install you want to make changes to.
  2. Make your changes to the configuration files.
  3. Run 10updocker stop all to stop all environments, including the global services.
  4. Run 10updocker start to get this install and the global services running.
  5. Run 10updocker stop to stop this install but not the global services.
  6. Run docker-compose up to recreate and start this install's docker containers. Wait for it to finish starting; this can be determined by watching the console output. Don't load the site in a browser. If there hasn't been anything new on the console for at least 10 seconds, you can proceed to the next step.
  7. Kill the newly-started docker process with the Control-C keyboard command, or your system's equivalent instruction.
  8. Run 10updocker restart to restart the container.

Upgrade an Environment

10updocker upgrade <hostname> will upgrade all services associated with a preexisting environment.

This command will assist you with keeping your environments up to date with the most recent upstream changes.

If the environment was created before v2.6.0, we recommend upgrading your environment for a noticeable performance increase.

If the environment was created before v3.0.1, this will update the elasticsearch image. When updating the elasticsearch image, we need to delete the docker volume so you will need to reindex after running this command.

Managing Certificates

10updocker cert generate <hostname> will generate certificates for use of SSL on local environments.

10updocker cert install installs a new certificate authority in the system trust store.

Elasticsearch

If you have enabled Elasticsearch for a particular environment, you can send requests from the host machine to the Elasticsearch server by prefixing the url path with /__elasticsearch/. For example, if you wanted to hit the /_all/_search/ endpoint of Elasticsearch, the URL would look like: http://<hostname>/__elasticsearch/_all/_search

In the ElasticPress settings, you should enter http://<hostname>/__elasticsearch as the Elasticsearch host.

WP Snapshots

See the section on using WP Snapshots

Running WP CLI Commands

Running WP CLI commands against an environment is easy. First, make sure you are somewhere within your environment directory (by default, this is somewhere within ~/wp-local-docker-sites/<environment>/). Once within the environment directory, simply run 10updocker wp <command>. <command> can be any valid command you would otherwise pass directly to WP CLI.

Examples:

  • 10updocker wp search-replace 'mysite.com' 'mysite.test'
  • 10updocker wp site list

Shell

You can get a shell inside of any container in your environment using the 10updocker shell [<service>] command. If a service is not provided, the phpfpm container will be used by default. Other available services can vary depending on the options selected during creation of the environment, but may include:

  • phpfpm
  • nginx
  • elasticsearch
  • memcached

Logs

Real time container logs are available using the 10updocker logs [<service>] command. If a service is not provided, logs from all containers in the current environment will be shown. To stop logs, type ctrl+c. Available services can vary depending on the options selected during creation of the environment, but may include:

  • phpfpm
  • nginx
  • elasticsearch
  • memcached

Clearing Shared Cache

WP CLI, WP Snapshots, and npm (when building the development version of WordPress) all utilize cache to speed up operations and save on bandwidth in the future.

10updocker cache clear Clears the WP CLI, WP Snapshots, and npm (for WordPress core development) caches.

Updating Docker Images

10updocker image update Will determine which of the docker images utilized by WP Local Docker are present on your system and update them to the latest version available.

Stopping global services

WP Local Docker relies on a set of global services to function properly. To turn off global services, run 10updocker stop all. This will stop all environments and then the global services.


Tools

phpMyAdmin

phpMyAdmin is available as part of the global services stack that is deployed to support all of the environments.

Access phpMyAdmin by navigating to http://localhost:8092.

  • Username: wordpress
  • Password: password

MailCatcher

MailCatcher is available as part of the global services stack that is deployed to support all of the environments. It is preconfigured to catch mail sent from any of the environments created by WP Local Docker.

Access MailCatcher by navigating to http://localhost:1080.

Xdebug version 3

Make sure you are running the expected version by running:

php -v | grep Xdebug

The command needs to be executed on the docker image of PHP in order to get the right version of docker running on that container.

The command above would return an ouput like:

    with Xdebug v3.1.1, Copyright (c) 2002-2021, by Derick Rethans

Update the configuration file on your site usually located at config/php-fpm/docker-php-ext-xdebug.ini in order to be updated to the new settings for Xdebug 3.

xdebug.client_host = host.docker.internal
xdebug.mode = develop,debug
xdebug.start_with_request = yes
xdebug.output_dir = /var/www/html/wp-content
xdebug.log=/var/www/html/wp-content

Make sure to restart your docker image after this changes or stop / start. To verify your changes were applied you can create a file called info.php and add <?php phpinfo(); ?> at the root of your project and then visit yourdomain.com/info.php and look for the values described above to verify your settings were actually applied, if that's not the case verify the path for your xdebug.ini file is actually placed into the right location.

Open the file docker-compose.yml and update the line:

'./config/php-fpm/docker-php-ext-xdebug.ini:/etc/php.d/docker-php-ext-xdebug.ini:cached'

with: (For PHP7.4) specifically it might vary depdending on your PHP version.

'./config/php-fpm/docker-php-ext-xdebug.ini:/etc/php/7.4/fpm/conf.d/99-ext-xdebug.ini:cached'

PHPStorm

Go to Settings > PHP > Debug.

  • Set the port to 9003
  • Check (Ignore external connections through unregistered server configurations) to avoid wait on non wanted files.
  • Check (Resolve breakpoint if it's not available on the current line)
  • Uncheck (Force break at first line when no path mapping specified)
  • Uncheck (Force break at frist line when a script is outside the project)

Go to Settings > PHP > Servers.

  • Add a new server with the following settings:

    • name: yourdomain.com
    • host: localhost
    • port: 80
    • debugger: Xdebug
    • Enable Use path mappings (select if the server is remote or symlinks are used)
    • Within the map directory select the path you want to debug (usually wp-content) and map it to /var/www/html/wp-content
  • Save your settings

  • Start to listen for connections on the top bar of your IDE (red phone icon)

Visual Studio Code

  1. Ensure Xdebug is enabled for the environment using the ENABLE_XDEBUG environment variable.
  2. Install the PHP Debug extension.
  3. In your project, go to the Debug view, click "Add Configuration..." and choose PHP environment. A new launch configuration will be created for you.
  4. Set the pathMappings parameter to your local wordpress directory. Example:
"configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "pathMappings": {
                "/var/www/html": "${workspaceFolder}/wordpress",
            }
        }
]

Xdebug version 2

Xdebug is included in the php images but must be manually enabled if you use wp-local-docker 2.7.0 or earlier. To enable Xdebug, set the environment variable ENABLE_XDEBUG to 'true' in the docker-compose.yml file in the root of the project. If you use wp-local-docker 2.8.0 or higher, then new environments will have Xdebug enabled by default.

Make sure your IDE is listening for PHP debug connections and set up a path mapping to your local environment's wordpress/ directory to /var/www/html/ in the container.

Visual Studio Code

  1. Ensure Xdebug is enabled for the environment using the ENABLE_XDEBUG environment variable.
  2. Install the PHP Debug extension.
  3. In your project, go to the Debug view, click "Add Configuration..." and choose PHP environment. A new launch configuration will be created for you.
  4. Set the pathMappings parameter to your local wordpress directory. Example:
"configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "pathMappings": {
                "/var/www/html": "${workspaceFolder}/wordpress",
            }
        }
]

WPsnapshots

Configuration

If you have not used WP Snapshots with WP Local Docker yet, you'll first need to configure WP Snapshots with your AWS credentials. To configure, run 10updocker wpsnapshots configure <repository> (e.g. 10updocker wpsnapshots configure 10up). You will then be prompted to enter your AWS credentials and a few other configuration details. Once complete, the configuration will be available across all of your WP Local Docker environments.

Pulling an Environment

10updocker wpsnapshots pull <snapshot-id> This command pulls an existing snapshot from the repository into your current environment, replacing your database and wp-content. This command must be run from withing your environment directory (by default, this is somewhere within ~/wp-local-docker-sites/<environment>/).

Searching for an Environment

10updocker wpsnapshots search <search-term> with searches the repository for snapshots. <search-text> will be compared against project names and authors. Searching for "*" will return all snapshots.

Other Commands

10updocker wpsnapshots <command> is the general form for all WP Snapshots commands. <command> is passed directly to WP Snapshots, so any command that WP Snapshots accepts will work in this form. Any command that requires a WordPress environment (pull, create, etc) needs to be run from somewhere within an environment directory (by default, this is somewhere within ~/wp-local-docker-sites/<environment>/).


F.A.Q

Can I run as many concurrent enviroments as I want?

Concurrent environments are limited by the available resources of your host machine.

I am having issues with wp-local-docker, what are the best troubleshooting techniques?

First make sure that Docker and Node are up to date. Then ensure that wp-local-docker is up to date as well by running npm i -g wp-local-docker. Once we are sure everything is up to date, it's generally a good idea to restart docker.

Now we will want to make sure we are using the latest of the docker images by running 10updocker image update.

Then run 10updocker configure and answer Yes to Do you want to reset your global services configuration? This will reset any customizations you have made.

Once you have reset the global configuration then you will want to reset the specific instance that is having the issue. You can do this by running 10updocker upgrade. This will replace the docker-compose.yml file for that particular site instance.

How to ignore node_modules/ in your container?

One of the primary performance bottlenecks with Docker for Mac is file syncing between the host machine and the Docker containers. The less files that are mounted into the Docker container volumes, the less work Docker needs to do ensuring those files are synced. NPM and the /node_modules/ directories are the worst offenders by far. Since assets are transpiled/compiled from source prior to being used on the frontend, the dependencies in node_modules/ are not actually required to run the site locally, only the compiled dist files.

In order to mitigate the additional pressure node_modules/ puts on Docker filesystem syncing, we can instruct Docker to ignore directories when mounting volumes. Technically, we are instructing Docker to mount nothing to a specific path on the volume, but the effect is the same. See below for a practical example of how one might edit the docker-compose.yml file in the site root:

nginx:
    # ...
    volumes:
        - './wordpress:/var/www/html:cached'
        - '/var/www/html/wp-content/themes/{my-theme}/node_modules'
        - '/var/www/html/wp-content/plugins/{my-plugin}/node_modules'
phpfpm:
    # ...
    volumes:
        - './wordpress:/var/www/html:cached'
        - '/var/www/html/wp-content/themes/{my-theme}/node_modules'
        - '/var/www/html/wp-content/plugins/{my-plugin}/node_modules'

Note: This action cannot be performed automatically as the specific paths to node_modules/ cannot be determined. You will need to manually determine the path where node_modules/ will be mounted onto the volume.

Once you have made the appropriate changes in your docker-compose.yml file, you must stop and start for the changes to take effect and confirm things have worked.

How do I upgrade an environment to a new version of PHP?

To upgrade to a newer version of PHP, please edit the docker-compose.yml file in the environment you are updating. From:

  phpfpm:
    image: '10up/wp-php-fpm-dev:5.6-ubuntu'
    # ...
    volumes:
      - './wordpress:/var/www/html:cached'
      - './config/php-fpm/docker-php-ext-xdebug.ini:/etc/php.d/5.6/fpm/docker-php-ext-xdebug.ini:cached'

To:

  phpfpm:
    image: '10up/wp-php-fpm-dev:7.4-ubuntu'
    # ...
    volumes:
      - './wordpress:/var/www/html:cached'
      - './config/php-fpm/docker-php-ext-xdebug.ini:/etc/php.d/7.4/fpm/docker-php-ext-xdebug.ini:cached'

Once you update this run docker-compose down and docker-compose up to rebuild the containers.

Avoiding conflicts with other local dev environments (Valet, MAMP, etc) on macOS

If you are running something like MAMP or Laravel Valet on your Mac, it is possible you may have port conflicts when attempting to use wp-local-docker, such as:

Cannot start service mysql: Ports are not available: listen tcp 127.0.0.1:3306: bind: address already in use

For the above error, that indicates that the mysqld process is already running using that same port (3306). To confirm what ports are currently in use on your Mac, run the following command in your terminal:

sudo lsof -i -P | grep LISTEN

# Alternatively you can search for the specific port in your error, substituting 3306 the port you want.
sudo lsof -i -P | grep :3306

If you see a process that is using that port, that process should be stopped before you attempt to start or create any new environments with wp-local-docker.

If you installed mysqld via Homebrew, you need to stop the process via Homebrew:

brew services stop mysql

Once you stop the service re-run the lsof command above to verify the port is no longer in use.

What if I want to modify the default ports for global services?

While you could modify the port configuration globally or per project, this will require making adjustments in other areas to prevent a permissions error when starting up the database, such as:

Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)

For best results we recommend using the default port configuration whenever possible.


Support Level

Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.

Like what you see?

More Repositories

1

ElasticPress

A fast and flexible search and query engine for WordPress.
PHP
1,242
star
2

Engineering-Best-Practices

10up Engineering Best Practices
SCSS
757
star
3

wp-local-docker

****** WP Local Docker V2 is now available - https://github.com/10up/wp-local-docker-v2
Shell
748
star
4

wp_mock

WordPress API Mocking Framework
PHP
674
star
5

distributor

Share content between your websites.
PHP
628
star
6

classifai

Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence.
PHP
567
star
7

action-wordpress-plugin-deploy

Deploy your plugin to the WordPress.org repository using GitHub Actions
Shell
521
star
8

actions-wordpress

GitHub Actions for WordPress!
Shell
419
star
9

MU-Migration

This WP-CLI plugin makes the process of moving sites from single WordPress sites to a Multisite instance (or vice-versa) much easier. It exports everything into a zip package which can be used to automatically import it within the desired Multisite installation.
PHP
324
star
10

safe-redirect-manager

A simple HTTP redirection plugin for WordPress.
PHP
311
star
11

wpcli-vulnerability-scanner

WP-CLI command for checking installed plugins and themes for vulnerabilities reported on wpvulndb.com
PHP
274
star
12

wp-component-library

A library of barebones front-end components built with WordPress and accessibility in mind.
HTML
270
star
13

safe-svg

Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.
PHP
263
star
14

grunt-wp-theme

WordPress Theme Project Templates
JavaScript
252
star
15

SketchPress

Sketch template for quickly creating awesome WordPress admin interface mockups and designs.
251
star
16

block-components

A collection of components built to be used in the block editor
TypeScript
251
star
17

WP-Minions

ARCHIVED: Job Queue for WordPress
PHP
231
star
18

restricted-site-access

Limit access to visitors who are logged in or allowed by IP addresses. Includes many options for handling blocked visitors.
PHP
228
star
19

wpsnapshots

(DEPRECATED) A project sharing tool for WordPress.
PHP
216
star
20

simple-local-avatars

Adds an avatar upload field to user profiles. Generates requested sizes on demand just like Gravatar!
PHP
213
star
21

wp-scaffold

10up WordPress project scaffold.
PHP
192
star
22

generator-wp-make

A Yeoman generator for making WordPress things
JavaScript
184
star
23

theme-scaffold

DEPRECATED. Use https://github.com/10up/wp-scaffold
PHP
184
star
24

grunt-wp-plugin

DEPRECATED: Please use https://github.com/10up/generator-wp-make instead.
JavaScript
183
star
25

simple-podcasting

A simple podcasting solution for WordPress.
PHP
179
star
26

nodeifywp

Powerful framework plugin for turning your WordPress theme into an isomorphic JavaScript application.
PHP
171
star
27

headstartwp

Build a headless website fast with WordPress, the world’s most popular CMS, and Next.js, the most popular React framework. A free and open source solution by the experts at 10up.
TypeScript
160
star
28

wp-hammer

ARCHIVED: Please see https://github.com/10up/wp-scrubber as replacement.
PHP
150
star
29

wpacceptance

ARCHIVED: A team scalable solution for reliable WordPress acceptance testing.
PHP
148
star
30

convert-to-blocks

Convert to Blocks is a WordPress plugin that transforms classic editor content to blocks on the fly.
PHP
147
star
31

simple-page-ordering

Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.
PHP
146
star
32

plugin-scaffold

DEPRECATED. Use https://github.com/10up/wp-scaffold
PHP
133
star
33

10up-experience

The 10up Experience plugin configures WordPress to better protect and inform clients, aligned to 10up’s best practices.
PHP
129
star
34

Async-Transients

ARCHIVED: Transients that serve stale data while regenerating the new transients in the background.
PHP
124
star
35

action-wordpress-plugin-asset-update

Update your plugin readme and assets in the WordPress.org repository outside of new releases
Shell
117
star
36

autoshare-for-twitter

Automatically shares the post title or custom message and a link to the post to X/Twitter.
PHP
117
star
37

10up-toolkit

Official 10up asset building toolkit.
JavaScript
108
star
38

wp-codeception

Integrates Codeception framework into WordPress and allows run tests using WP CLI command.
PHP
103
star
39

twentysixteenreact

Twenty Sixteen theme as an isomorphic React.js application using NodeifyWP.
CSS
93
star
40

slotfill-and-filter-demos

This repo can be used as reference or can be installed as a plugin in any WordPress install to make code changes as needed. Each SlotFill or filter is explained with examples. This is meant to be a working document and will change as Gutenberg does.
JavaScript
93
star
41

gutenberg-best-practices

Welcome to the 10up Gutenberg Best Practices!
JavaScript
88
star
42

eight-day-week

Optimize print publication workflows by using WordPress as your print CMS.
PHP
86
star
43

wp-content-connect

WordPress library that enables direct relationships for posts to posts and posts to users.
JavaScript
83
star
44

nginx_configs

ARCHIVED: Nginx Configuration Template for WordPress Sites
C++
77
star
45

project-scaffold

DEPRECATED. Use https://github.com/10up/wp-scaffold
JavaScript
76
star
46

insert-special-characters

A Special Character inserter for the WordPress block editor (Gutenberg).
JavaScript
71
star
47

maps-block-apple

An Apple Maps block for the WordPress block editor (Gutenberg).
JavaScript
70
star
48

secured-advanced-custom-fields

ARCHIVED: Secured version of the Advanced Custom Fields plugin
PHP
63
star
49

windows-azure-storage

Use the Microsoft Azure Storage service to host your website's media files.
PHP
61
star
50

wp-newrelic

New Relic APM reports for WordPress.
PHP
59
star
51

component-library

A library of barebones front-end components built with WordPress and accessibility in mind.
JavaScript
58
star
52

ads-txt

Ads.txt Manager for WordPress: Manage your ads.txt and app-ads.txt files in the WordPress dashboard
PHP
56
star
53

Post-Customizer

A WordPress plugin to enhance the post editor preview
JavaScript
51
star
54

phpcs-composer

Official 10up PHPCS rules.
PHP
48
star
55

Open-Source-Best-Practices

Start reading: https://10up.github.io/Open-Source-Best-Practices/
SCSS
46
star
56

WordPress-Server-Configs

Configurations for the common Linux software stack 10up uses for WordPress
Nginx
44
star
57

10up-code-review

Custom PHP_CodeSniffer rules to help flag common issues during code review
PHP
43
star
58

publisher-media-kit

Pre-configured Media Kit Page using Gutenberg Block Patterns.
PHP
42
star
59

block-catalog

Easily keep track of which Gutenberg Blocks are used across your WordPress site.
PHP
40
star
60

curator

Select specific posts from across multiple post types to combine together and control the ordering.
PHP
38
star
61

insecure-content-warning

Prevent editors from adding insecure content in the editor.
JavaScript
37
star
62

retro-winamp-block

A Winamp-styled audio block for all your retro music player needs.
JavaScript
35
star
63

wordpress-ci-container

WordPress continuous integration Docker container with composer, NPM, and other common build tools for PHP projects
Shell
35
star
64

vagrant-ghost

Vagrant Hosts Updater Plugin
Ruby
31
star
65

elasticpress-react

Use ElasticPress with React.
JavaScript
30
star
66

10up-sitemaps

Simple sitemaps plugin that performs at scale.
PHP
29
star
67

debug-bar-elasticpress

Extends the Debug Bar plugin for usage with ElasticPress
PHP
27
star
68

simple-new-post-emails

Allow site members to check a box and get new posts via email. Includes a widget.
PHP
27
star
69

elasticpress-autosuggest

DEPRECATED - Functionality merged into core ElasticPress plugin
JavaScript
26
star
70

nodeifywp-environment

Dockerized environment for NodeifyWP applications.
26
star
71

action-wordpress-plugin-build-zip

Build a zip archive of your WordPress.org plugin using GitHub Actions
Shell
25
star
72

Docker-Images

Docker image repository
Shell
24
star
73

Ad-Refresh-Control

Enable Active View refresh for Google Ad Manager ads without needing to modify any code.
PHP
24
star
74

cypress-wp-utils

Utilities library for WordPress E2E testing in the Cypress environment
TypeScript
23
star
75

secure-media

ARCHIVED: Store private media securely in WordPress.
PHP
23
star
76

elasticpress-woocommerce-deprecated

DEPRECATED - Bundled in ElasticPress 2.1
PHP
22
star
77

brightcove-video-connect

A plugin to integrate your Brightcove video library or libraries with WordPress
PHP
22
star
78

Brute-Force-Login-Prevention

Assists in preventing common brute force login attempts by modifying the default login URL for WordPress.
PHP
20
star
79

snapshots

(BETA) A project sharing tool for WordPress. Previously known as WP Snapshots.
PHP
20
star
80

wp-safe-edit

ARCHIVED: Safely edit published posts behind the scenes without affecting the live site.
PHP
18
star
81

elasticpress-proxy

A custom PHP Proxy to handle Instant Results requests.
PHP
18
star
82

ElasticPressLabs

A developer-focused interface to enabling experimental ElasticPress plugin features.
PHP
18
star
83

wp-local-docker-docs

Documentation for WP Local Docker
SCSS
18
star
84

cypress-wp-setup

NPM package to set up boilerplate for Cypress testing.
JavaScript
17
star
85

gutenberg-lessons

10up Gutenberg Training WordPress Starter Files
PHP
17
star
86

image-generator

Generates missed thumbnails for images on the fly.
PHP
17
star
87

SwiftStream

Image lazy-loader for WordPress.
PHP
16
star
88

grunt-for-wordpress

Install Grunt, Git, and 10up WordPress Grunt scripts.
Shell
16
star
89

eslint-config

A shareable ESLint config.
JavaScript
16
star
90

elasticpress-stream

ARCHIVED: Use ElasticPress to power Stream with Elasticsearch.
PHP
16
star
91

wp-scrubber

BETA: This plugin provides a command-line interface for scrubbing sensitive user and comment data from a WordPress installation.
PHP
15
star
92

action-repo-automator

GitHub Action to automate common repo operations like validate PR description, changelog, and credits.
JavaScript
15
star
93

Gitlab-Registry-Cleaner

Bash script using the GitLab API to delete images from a GitLab container registry. Supports regex and deleting images older than a specific age.
Shell
15
star
94

frontity-packages

10up's collection of frontity packages.
JavaScript
15
star
95

CSS_Customizer

Drop in class for implementing a custom CSS editor either as a standalone settings page or a meta box.
PHP
14
star
96

ElasticPress-Admin-Deprecated

THIS FEATURE HAS BEEN MOVED TO THE CORE ELASTICPRESS PLUGIN.
PHP
13
star
97

composer-scan

ARCHIVED: Scans your composer.lock file to find vulnerable WordPress plugins and themes using the https://wpvulndb.com API
Python
12
star
98

simple-google-news-sitemap

A simple Google News sitemap is generated on-the-fly for articles that were published in the last two days. Output is saved in cache or as a transient for fast reading and displaying on the front end.
PHP
12
star
99

Publish-to-Twitter

Publish to Twitter based on WordPress taxonomies.
JavaScript
11
star
100

animation-best-practices

Welcome to the 10up Animation Best Practices!
HTML
11
star