PHPackages                             awps/wp-mailhog-mu-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. awps/wp-mailhog-mu-plugin

ActiveWordpress-muplugin[Utility &amp; Helpers](/categories/utility)

awps/wp-mailhog-mu-plugin
=========================

WordPress Mailhog MU Plugin. Designed to be used in tandem with docker-compose

0.2.0(5y ago)096GPL-2.0+PHP

Since Mar 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/awps/wp-mailhog-mu-plugin)[ Packagist](https://packagist.org/packages/awps/wp-mailhog-mu-plugin)[ RSS](/packages/awps-wp-mailhog-mu-plugin/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

WordPress MailHog MU Plugin
===========================

[](#wordpress-mailhog-mu-plugin)

WordPress Mailhog MU Plugin. Designed to be used in tandem with docker-compose.

### Install it as a dev dependency:

[](#install-it-as-a-dev-dependency)

```
composer require awps/wp-mailhog-mu-plugin --dev

```

### Add the instructions for plugin location:

[](#add-the-instructions-for-plugin-location)

**Note:** Replace `.srv/wordpress/` with the path of your WP installation.

```
"extra": {
    "installer-paths": {
      ".srv/wordpress/wp-content/mu-plugins/{$name}/": [ "type:wordpress-muplugin"]
    }
},

```

### Add the Mailhog configuration in `docker-compose.yml`

[](#add-the-mailhog-configuration-in-docker-composeyml)

```
version: '3'
services:
    # ... other services
    mailhog:
        image: mailhog/mailhog
        ports:
            - 1025:1025 # smtp server
            - 8025:8025 # web ui

```

### Lastly, add the loader inside of `mu-plugins`.

[](#lastly-add-the-loader-inside-of-mu-plugins)

By default, MU Plugins can't be loaded from folders, they must be one single file. Hopefully we can trick the system by loading all plugins that follow a simple pattern. See this gist for details.

Save this code in a file and place it inside `mu-plugins` dir.

```
