• I have set up a dockerized wordpress environment that looks like this:

    Mac-mini-3:nov11test admin$ docker ps
    

    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    bde5d5dc6ccb nov11test_nginx “/docker-entrypoint.…” 5 minutes ago Up 4 minutes 0.0.0.0:443->443/tcp, 80/tcp, 0.0.0.0:8085->8085/tcp widgets_nginx
    ecb13db96046 nov11test_wordpress “docker-entrypoint.s…” 6 minutes ago Up 4 minutes 9000/tcp widgets_wordpress
    90fe3eb3c044 adminer “entrypoint.sh docke…” 6 minutes ago Up 5 minutes 0.0.0.0:8080->8080/tcp widgets_adminer
    8c14f12abdd7 mariadb:10.6.4-focal “docker-entrypoint.s…” 6 minutes ago Up 3 minutes 3306/tcp widgets_mysql
    1bdbcbdc5cf5 mailhog/mailhog:latest “MailHog” 6 minutes ago Up 5 minutes 0.0.0.0:1025->1025/tcp, 0.0.0.0:8025->8025/tcp widgets_mailhog

    as you can see, I have wordpress running on one container (https://localhost) pulls it up…
    and mailhog running on another (https://localhost:8025)

    When I run the docker compose, I end up with a fresh word press install… and it works just fine. I was under the impression I could just install the mailhog plugin using the wordpress gui… and then edit the plug in code so that it doesn’t point to “127.0.0.1” for the server, but to my mailhog docker container.

    But when I do a “forgot” password in wordpress, it gives me the error that wordpress isn’t configured properly.
    So my question is, in order to get the mailhog plugin to work on a fresh wordpress install (with no other plugins) are there other steps that need to be taken?

Viewing 1 replies (of 1 total)
  • Greys

    (@jgreys)

    Hello @codebrews !

    Faced the same issue. In your wp-config.php file, define the following constants:

    define( 'WP_MAILHOG_HOST', 'mailhog' );
    define( 'WP_MAILHOG_PORT', '1025' );

    Also, there is apparently a priority issue for phpmailer_init action.
    @tareq1988 would it be possible to set the priority to 20 ?

    Thanks!

    • This reply was modified 3 years ago by Greys.
Viewing 1 replies (of 1 total)
  • The topic ‘Configuration in Docker environment’ is closed to new replies.