### List WordPress Users with WP-CLI Source: https://hub.docker.com/_/wordpress This example shows how to use the `wordpress:cli` image to list WordPress users. It requires mounting volumes and joining the network of an existing WordPress container, and setting database credentials via environment variables. ```Shell $ docker run -it --rm \ --volumes-from some-wordpress \ --network container:some-wordpress \ -e WORDPRESS_DB_USER=... \ -e WORDPRESS_DB_PASSWORD=... \ # [and other used environment variables] wordpress:cli user list ``` -------------------------------- ### WordPress Docker Secrets Configuration Source: https://hub.docker.com/_/wordpress Example of using Docker secrets to pass sensitive database credentials to the WordPress container. Append '_FILE' to environment variables to load values from files. ```bash $ docker run --name some-wordpress -e WORDPRESS_DB_PASSWORD_FILE=/run/secrets/mysql-root ... -d wordpress:tag ``` -------------------------------- ### Pull WordPress version 7.0 with PHP 8.5-Apache Source: https://hub.docker.com/_/wordpress/tags This command pulls WordPress version 7.0 with PHP 8.5 and Apache. It's suitable for targeting a major version with a specific PHP and web server setup. ```bash docker pull wordpress:7.0-php8.5-apache ``` -------------------------------- ### Dockerfile for Static WordPress Deployment Source: https://hub.docker.com/_/wordpress Use this Dockerfile to create a static WordPress image. It copies custom themes and plugins and configures Apache to work with the new directory structure. Ensure read/write/execute permissions are set. ```dockerfile FROM wordpress:apache WORKDIR /usr/src/wordpress RUN set -eux; \ find /etc/apache2 -name '*.conf' -type f -exec sed -ri -e "s!/var/www/html!$PWD!g" -e "s!Directory /var/www/!Directory $PWD!g" '{}' +; \ cp -s wp-config-docker.php wp-config.php COPY custom-theme/ ./wp-content/themes/custom-theme/ COPY custom-plugin/ ./wp-content/plugins/custom-plugin/ ``` -------------------------------- ### Run WordPress Container Source: https://hub.docker.com/_/wordpress Basic command to run a WordPress container. Ensure the database is set up separately. ```bash $ docker run --name some-wordpress --network some-network -d wordpress ``` -------------------------------- ### Docker Compose for WordPress and Database Source: https://hub.docker.com/_/wordpress A docker-compose.yaml file to set up WordPress and a MySQL database service. This configuration includes persistent volumes for both services. ```yaml services: wordpress: image: wordpress restart: always ports: - 8080:80 environment: WORDPRESS_DB_HOST: db WORDPRESS_DB_USER: exampleuser WORDPRESS_DB_PASSWORD: examplepass WORDPRESS_DB_NAME: exampledb volumes: - wordpress:/var/www/html db: image: mysql:8.0 restart: always environment: MYSQL_DATABASE: exampledb MYSQL_USER: exampleuser MYSQL_PASSWORD: examplepass MYSQL_RANDOM_ROOT_PASSWORD: '1' volumes: - db:/var/lib/mysql volumes: wordpress: db: ``` -------------------------------- ### Docker Run Command for Static Deployment Source: https://hub.docker.com/_/wordpress This command runs a WordPress container in read-only mode, suitable for static deployments. It mounts temporary file systems and specifies database and authentication keys. Ensure to provide writeable storage for /tmp and /run. ```bash $ docker run ... \ --read-only \ --tmpfs /tmp \ --tmpfs /run \ --mount type=...,src=...,dst=/usr/src/wordpress/wp-content/uploads \ ... \ --env WORDPRESS_DB_HOST=... \ --env WORDPRESS_AUTH_KEY=... \ --env ... \ custom-wordpress:tag ``` -------------------------------- ### Expose WordPress Port Source: https://hub.docker.com/_/wordpress Run a WordPress container and map host port 8080 to container port 80 for external access. ```bash $ docker run --name some-wordpress -p 8080:80 -d wordpress ``` -------------------------------- ### Dockerfile for Custom PHP Configuration Source: https://hub.docker.com/_/wordpress This Dockerfile demonstrates how to configure PHP directives for a WordPress container. It copies a custom INI file to the PHP configuration directory to override default settings like upload_max_filesize. ```dockerfile FROM wordpress:tag COPY custom.ini $PHP_INI_DIR/conf.d/ ``` -------------------------------- ### Pull WordPress with PHP 8.5-FPM Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.5 and FPM. This is suitable for environments that manage the web server separately. ```bash docker pull wordpress:php8.5-fpm ``` -------------------------------- ### Add Custom FPM Configuration via Dockerfile Source: https://hub.docker.com/_/wordpress This snippet demonstrates how to add custom FPM configuration by creating a new configuration file within the Dockerfile. It sets the `pm.status_path` directive for the `www` pool. ```Dockerfile FROM php:8-fpm RUN set -eux; \ { echo '[www]'; \ echo 'pm.status_path = /status'; \ } > /usr/local/etc/php-fpm.d/my-fpm.conf ``` -------------------------------- ### Pull WordPress 7-php8.5-apache Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.5 and Apache. ```bash docker pull wordpress:7-php8.5-apache ``` -------------------------------- ### Pull WordPress latest Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the latest stable version of the WordPress image. ```bash docker pull wordpress:latest ``` -------------------------------- ### Pull WordPress with PHP 8.5-Apache Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.5 and the Apache web server. This is a self-contained image. ```bash docker pull wordpress:php8.5-apache ``` -------------------------------- ### Pull WordPress php8.3-apache Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.3 and Apache. ```bash docker pull wordpress:php8.3-apache ``` -------------------------------- ### Pull WordPress version 7.0.0 with PHP 8.5 Source: https://hub.docker.com/_/wordpress/tags This command pulls WordPress version 7.0.0 with PHP 8.5. It includes the default web server configuration. ```bash docker pull wordpress:7.0.0-php8.5 ``` -------------------------------- ### Pull WordPress php8.3-fpm Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.3 and FPM. ```bash docker pull wordpress:php8.3-fpm ``` -------------------------------- ### Pull WordPress 7-php8.4-fpm Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.4 and FPM. ```bash docker pull wordpress:7-php8.4-fpm ``` -------------------------------- ### Pull WordPress php8.2-apache Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.2 and Apache. ```bash docker pull wordpress:php8.2-apache ``` -------------------------------- ### Pull WordPress php8.4-apache Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.4 and Apache. ```bash docker pull wordpress:php8.4-apache ``` -------------------------------- ### Pull WordPress php8.2-fpm Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.2 and FPM. ```bash docker pull wordpress:php8.2-fpm ``` -------------------------------- ### Pull WordPress version 7.0 with PHP 8.5 Source: https://hub.docker.com/_/wordpress/tags This command pulls WordPress version 7.0 with PHP 8.5 and its default web server configuration. ```bash docker pull wordpress:7.0-php8.5 ``` -------------------------------- ### Pull WordPress version 7.0.0 with PHP 8.5-Apache Source: https://hub.docker.com/_/wordpress/tags This command pulls a specific version of WordPress (7.0.0) with PHP 8.5 and Apache. It's useful for precise version and environment control. ```bash docker pull wordpress:7.0.0-php8.5-apache ``` -------------------------------- ### Pull WordPress version 7.0.0 with PHP 8.5-FPM Source: https://hub.docker.com/_/wordpress/tags This command pulls a specific version of WordPress (7.0.0) with PHP 8.5 and FPM. Use this for precise version control. ```bash docker pull wordpress:7.0.0-php8.5-fpm ``` -------------------------------- ### Pull WordPress with PHP 8.5 Source: https://hub.docker.com/_/wordpress/tags This command pulls the WordPress image with PHP 8.5, typically using the default web server configuration (often Apache). ```bash docker pull wordpress:php8.5 ``` -------------------------------- ### Pull WordPress with PHP 8.4-FPM Source: https://hub.docker.com/_/wordpress/tags This command pulls the WordPress image with PHP 8.4 and FPM. It's useful for projects requiring PHP 8.4. ```bash docker pull wordpress:php8.4-fpm ``` -------------------------------- ### Pull WordPress 7-php8.5 Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.5. ```bash docker pull wordpress:7-php8.5 ``` -------------------------------- ### Pull WordPress php8.3 Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.3. ```bash docker pull wordpress:php8.3 ``` -------------------------------- ### Pull WordPress version 7.0 with PHP 8.4-FPM Source: https://hub.docker.com/_/wordpress/tags This command pulls WordPress version 7.0 with PHP 8.4 and FPM. It's useful for projects requiring this specific combination. ```bash docker pull wordpress:7.0-php8.4-fpm ``` -------------------------------- ### Pull WordPress version 7.0 with PHP 8.5-FPM Source: https://hub.docker.com/_/wordpress/tags This command pulls WordPress version 7.0 with PHP 8.5 and FPM. It's useful for targeting a major version with a specific PHP runtime. ```bash docker pull wordpress:7.0-php8.5-fpm ``` -------------------------------- ### Pull WordPress version 7.0.0 with PHP 8.4-FPM Source: https://hub.docker.com/_/wordpress/tags This command pulls WordPress version 7.0.0 with PHP 8.4 and FPM. Use this for specific version and PHP runtime requirements. ```bash docker pull wordpress:7.0.0-php8.4-fpm ``` -------------------------------- ### Pull WordPress php8.2 Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.2. ```bash docker pull wordpress:php8.2 ``` -------------------------------- ### Pull WordPress version 7 with PHP 8.5-FPM Source: https://hub.docker.com/_/wordpress/tags This command pulls WordPress version 7 with PHP 8.5 and FPM. It targets the major version 7 of WordPress. ```bash docker pull wordpress:7-php8.5-fpm ``` -------------------------------- ### Pull WordPress php8.4 Source: https://hub.docker.com/_/wordpress/tags Use this command to pull the WordPress image with PHP 8.4. ```bash docker pull wordpress:php8.4 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.