{"id":20912947,"url":"https://github.com/erseco/alpine-wordpress","last_synced_at":"2026-04-10T00:57:53.504Z","repository":{"id":222490110,"uuid":"757430049","full_name":"erseco/alpine-wordpress","owner":"erseco","description":"WordPress docker image based on Alpine Linux","archived":false,"fork":false,"pushed_at":"2024-12-09T12:33:17.000Z","size":37,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-12T22:41:37.509Z","etag":null,"topics":["docker","hacktoberfest","lightweight","nginx","php","wordpress","wp-cli"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/erseco/alpine-wordpress","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erseco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-14T13:34:24.000Z","updated_at":"2024-12-09T12:33:07.000Z","dependencies_parsed_at":"2025-03-13T02:16:34.729Z","dependency_job_id":null,"html_url":"https://github.com/erseco/alpine-wordpress","commit_stats":null,"previous_names":["erseco/alpine-wordpress"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/erseco/alpine-wordpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erseco%2Falpine-wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erseco%2Falpine-wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erseco%2Falpine-wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erseco%2Falpine-wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erseco","download_url":"https://codeload.github.com/erseco/alpine-wordpress/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erseco%2Falpine-wordpress/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267598450,"owners_count":24113634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","hacktoberfest","lightweight","nginx","php","wordpress","wp-cli"],"created_at":"2024-11-18T14:34:18.408Z","updated_at":"2025-12-30T21:57:23.815Z","avatar_url":"https://github.com/erseco.png","language":"Shell","funding_links":["https://www.buymeacoffee.com/erseco"],"categories":[],"sub_categories":[],"readme":"# WordPress on Alpine Linux\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/erseco/alpine-wordpress.svg)](https://hub.docker.com/r/erseco/alpine-wordpress/)\n![Docker Image Size](https://img.shields.io/docker/image-size/erseco/alpine-wordpress)\n![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)\n\u003ca href=\"https://www.buymeacoffee.com/erseco\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" height=\"20px\"\u003e\u003c/a\u003e\n\nWordPress setup for Docker, build on [Alpine Linux](http://www.alpinelinux.org/).\nThe image is only +/- 70MB large.\n\nRepository: https://github.com/erseco/alpine-wordpress\n\n\n* Built on the lightweight image https://github.com/erseco/alpine-php-webserver\n* Very small Docker image size (+/-70MB)\n* Uses PHP-FPM for better performance, lower cpu usage \u0026 memory footprint\n* Multi-arch support: 386, amd64, arm/v6, arm/v7, arm64, ppc64le, s390x\n* Optimized for 1000 concurrent users\n* Optimized to only use resources when there's traffic (by using PHP-FPM's ondemand PM)\n* Use of runit instead of supervisord to reduce memory footprint\n* docker-compose sample with MariaDB\n* Configuration via ENV variables\n* Easily upgradable to new WordPress versions\n* Includes [WP-CLI](https://wp-cli.org/) for command-line management and automation of WordPress tasks, enhancing site management and deployment capabilities.\n* The servers Nginx, PHP-FPM run under a non-privileged user (nobody) to make it more secure\n* The logs of all the services are redirected to the output of the Docker container (visible with `docker logs -f \u003ccontainer name\u003e`)\n* Follows the KISS principle (Keep It Simple, Stupid) to make it easy to understand and adjust the image to your needs\n\n## Usage\n\nStart the Docker containers:\n\n    docker-compose up\n\nLogin on the system using the provided credentials (ENV vars)\n\n## Running Commands as Root\n\nIn certain situations, you might need to run commands as `root` within your WordPress container, for example, to install additional packages. You can do this using the `docker-compose exec` command with the `--user root` option. Here's how:\n\n```bash\ndocker-compose exec --user root wordpress sh\n```\n\n## WordPress Plugin Development Environment Setup\n\nBelow is a `docker-compose.yml` example specifically designed for WordPress plugin development. This configuration provides a comprehensive setup for developing, testing, and deploying WordPress plugins efficiently.\n\n```yaml\nservices:\n  mariadb:\n    image: mariadb:latest\n    restart: unless-stopped\n    environment:\n      - MYSQL_ROOT_PASSWORD=wordpress\n      - MYSQL_DATABASE=wordpress\n      - MYSQL_USER=wordpress\n      - MYSQL_PASSWORD=wordpress\n    volumes:\n      - mariadb:/var/lib/mysql\n\n  wordpress:\n    image: erseco/alpine-wordpress:latest\n    restart: unless-stopped\n    depends_on:\n      - mariadb\n    ports:\n      - 8080:8080      \n    environment:\n      WP_LANGUAGE: es_ES\n      WP_ADMIN_USERNAME: admin\n      WP_ADMIN_PASSWORD: PLEASE_CHANGEME\n      WP_DEBUG: true\n      WP_PLUGINS: user-access-manager\n      WP_SITE_URL: http://localhost:8080\n      POST_CONFIGURE_COMMANDS: |\n        echo \"Creating user for testing\"\n        if ! wp user get test1 --field=ID --quiet; then\n          wp user create test1 test1@example.com --role=subscriber --user_pass=test1\n        fi\n        echo \"Activating plugin\"\n        wp plugin activate my-plugin\n    volumes:\n      - wordpress:/var/www/html\n      - ./my-plugin:/var/www/html/wp-content/plugins/my-plugin\n\nvolumes:\n  mariadb: null\n  wordpress: null\n```\n\n- **MariaDB service**: Configures a MariaDB database with WordPress-specific settings, ensuring data persistence through Docker volumes.\n- **WordPress service**:\n  - Uses `erseco/alpine-wordpress:latest`, tailored for WordPress development.\n  - Sets up WordPress with Spanish language, admin credentials, and enables debugging.\n  - Pre-installs and activates specified plugins, including a custom plugin located in `./my-plugin`.\n  - Executes custom commands after configuration, like creating a test user and activating the developed plugin.\n  - Maps port 8080, allowing local access to the WordPress site.\n  - Depends on the `mariadb` service for database connectivity.\n\n### How to Use\n\n1. Save the provided `docker-compose.yml` in your project directory.\n2. Place your plugin code inside a directory named `my-plugin` in the same location.\n3. Execute `docker-compose up -d` in your terminal, within the project directory.\n4. Access your WordPress site at `http://localhost:8080` to test and develop your plugin in a real-world environment.\n\nThis setup streamlines the plugin development process, from coding and testing to deployment, within a controlled and consistent environment.\n\n## Configuration\nDefine the ENV variables in docker-compose.yml file\n\n| Variable Name           | Default                     | Description                                       |\n|-------------------------|-----------------------------|---------------------------------------------------|\n| WP_LANGUAGE             | en_US                       | WordPress site language                           |\n| DB_HOST                 | mariadb                     | Database host                                     |\n| DB_PORT                 | 3306                        | MySQL default port                                |\n| DB_NAME                 | wordpress                   | Database name                                     |\n| DB_USER                 | wordpress                   | Database user                                     |\n| DB_PASSWORD             | wordpress                   | Database password                                 |\n| DB_PREFIX               | wp_                         | Database prefix for WordPress tables              |\n| WP_ADMIN_EMAIL          | admin@example.com           | WordPress admin email                             |\n| WP_ADMIN_USERNAME       | admin                       | WordPress admin username                          |\n| WP_ADMIN_PASSWORD       | PLEASE_CHANGEME             | WordPress admin password                          |\n| WP_DEBUG                | false                       | Enable/disable WordPress debugging                |\n| WP_CLI_CACHE_DIR        | /tmp/wp-cli/cache/          | WP-CLI cache directory path                       |\n| WP_THEME                |                             | Active WordPress theme                            |\n| WP_PLUGINS              |                             | Comma-separated list of WordPress plugins         |\n| WP_SITE_TITLE           | WordPress Site              | Title of the WordPress site                       |\n| WP_SITE_DESCRIPTION     | Just another WordPress site | Description of the WordPress site                 |\n| WP_SITE_URL             | http://localhost:8080       | WordPress site URL                                |\n| client_max_body_size    | 50M                         | Maximum allowed size of client request bodies     |\n| post_max_size           | 50M                         | Maximum size of POST data that PHP will accept    |\n| upload_max_filesize     | 50M                         | Maximum size of an uploaded file                  |\n| max_input_vars          | 5000                        | Maximum number of input variables for PHP         |\n| zlib_output_compression | Off                         | Disable zlib compresion for PHP                   |\n| PRE_CONFIGURE_COMMANDS  |                             | Commands to run before starting the configuration |\n| POST_CONFIGURE_COMMANDS |                             | Commands to run after finished the configuration  |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferseco%2Falpine-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferseco%2Falpine-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferseco%2Falpine-wordpress/lists"}