专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

wordpress Docker 镜像 - 轩辕镜像 | Docker 镜像高效稳定拉取服务

wordpress
library/wordpress
Docker 官方镜像
WordPress作为全球广泛使用的开源平台,是一款功能丰富的内容管理系统,它能够通过灵活运用各类插件、实用小工具及多样化主题,帮助用户轻松构建个性化网站、高效管理图文影音等各类内容,并根据需求自定义界面风格与功能模块,满足从个人博客到企业站点的不同场景应用需求。
5.9千 次收藏下载次数: 0状态:Docker 官方镜像维护者:Docker 官方镜像仓库类型:镜像
⚠️ 线上容器拉取慢、不稳定?拉镜像别再赌运气
版本下载
⚠️ 线上容器拉取慢、不稳定?拉镜像别再赌运气

Quick reference

  • Maintained by:
    the Docker Community

  • Where to get help:
    the Docker Community Slack, Server Fault, Unix & Linux, or Stack Overflow

Supported tags and respective Dockerfile links

  • 6.9.0-php8.2-apache, 6.9-php8.2-apache, 6-php8.2-apache, php8.2-apache, 6.9.0-php8.2, 6.9-php8.2, 6-php8.2, php8.2

  • 6.9.0-php8.2-fpm, 6.9-php8.2-fpm, 6-php8.2-fpm, php8.2-fpm

  • 6.9.0-php8.2-fpm-alpine, 6.9-php8.2-fpm-alpine, 6-php8.2-fpm-alpine, php8.2-fpm-alpine

  • 6.9.0-apache, 6.9-apache, 6-apache, apache, 6.9.0, 6.9, 6, latest, 6.9.0-php8.3-apache, 6.9-php8.3-apache, 6-php8.3-apache, php8.3-apache, 6.9.0-php8.3, 6.9-php8.3, 6-php8.3, php8.3

  • 6.9.0-fpm, 6.9-fpm, 6-fpm, fpm, 6.9.0-php8.3-fpm, 6.9-php8.3-fpm, 6-php8.3-fpm, php8.3-fpm

  • 6.9.0-fpm-alpine, 6.9-fpm-alpine, 6-fpm-alpine, fpm-alpine, 6.9.0-php8.3-fpm-alpine, 6.9-php8.3-fpm-alpine, 6-php8.3-fpm-alpine, php8.3-fpm-alpine

  • 6.9.0-php8.4-apache, 6.9-php8.4-apache, 6-php8.4-apache, php8.4-apache, 6.9.0-php8.4, 6.9-php8.4, 6-php8.4, php8.4

  • 6.9.0-php8.4-fpm, 6.9-php8.4-fpm, 6-php8.4-fpm, php8.4-fpm

  • 6.9.0-php8.4-fpm-alpine, 6.9-php8.4-fpm-alpine, 6-php8.4-fpm-alpine, php8.4-fpm-alpine

  • 6.9.0-php8.5-apache, 6.9-php8.5-apache, 6-php8.5-apache, php8.5-apache, 6.9.0-php8.5, 6.9-php8.5, 6-php8.5, php8.5

  • 6.9.0-php8.5-fpm, 6.9-php8.5-fpm, 6-php8.5-fpm, php8.5-fpm

  • 6.9.0-php8.5-fpm-alpine, 6.9-php8.5-fpm-alpine, 6-php8.5-fpm-alpine, php8.5-fpm-alpine

  • cli-2.12.0-php8.2, cli-2.12-php8.2, cli-2-php8.2, cli-php8.2

  • cli-2.12.0, cli-2.12, cli-2, cli, cli-2.12.0-php8.3, cli-2.12-php8.3, cli-2-php8.3, cli-php8.3

  • cli-2.12.0-php8.4, cli-2.12-php8.4, cli-2-php8.4, cli-php8.4

  • cli-2.12.0-php8.5, cli-2.12-php8.5, cli-2-php8.5, cli-php8.5

Quick reference (cont.)

  • Where to file issues:
    [***]

  • Supported architectures: (more info)
    amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x

  • Published image artifact details:
    repo-info repo's repos/wordpress/ directory (history)
    (image metadata, transfer size, etc)

  • Image updates:
    official-images repo's library/wordpress label
    official-images repo's library/wordpress file (history)

  • Source of this description:
    docs repo's wordpress/ directory (history)

What is WordPress?

WordPress is a free and open source blogging tool and a content management system (CMS) based on PHP and MySQL, which runs on a web hosting service. Features include a plugin architecture and a template system. WordPress is used by more than 22.0% of the top 10 million websites as of August 2013. WordPress is the most popular blogging system in use on the Web, at more than 60 million websites. The most popular languages used are English, Spanish and Bahasa Indonesia.

***.org/wiki/WordPress

!logo

How to use this image

console
$ docker run --name some-wordpress --network some-network -d wordpress

The following environment variables are also honored for configuring your WordPress instance (by a custom wp-config.php implementation):

  • -e WORDPRESS_DB_HOST=...
  • -e WORDPRESS_DB_USER=...
  • -e WORDPRESS_DB_PASSWORD=...
  • -e WORDPRESS_DB_NAME=...
  • -e WORDPRESS_TABLE_PREFIX=...
  • -e WORDPRESS_AUTH_KEY=..., -e WORDPRESS_SECURE_AUTH_KEY=..., -e WORDPRESS_LOGGED_IN_KEY=..., -e WORDPRESS_NONCE_KEY=..., -e WORDPRESS_AUTH_SALT=..., -e WORDPRESS_SECURE_AUTH_SALT=..., -e WORDPRESS_LOGGED_IN_SALT=..., -e WORDPRESS_NONCE_SALT=... (default to unique random SHA1s, but only if other environment variable configuration is provided)
  • -e WORDPRESS_DEBUG=1 (defaults to disabled, non-empty value will enable WP_DEBUG in wp-config.php)
  • -e WORDPRESS_CONFIG_EXTRA=... (defaults to nothing, the value will be evaluated by the eval() function in wp-config.php. This variable is especially useful for applying extra configuration values this image does not provide by default such as WP_ALLOW_MULTISITE; see docker-library/wordpress#142 for more details)

The WORDPRESS_DB_NAME needs to already exist on the given MySQL server; it will not be created by the wordpress container.

If you'd like to be able to access the instance from the host without the container's IP, standard port mappings can be used:

console
$ docker run --name some-wordpress -p 8080:80 -d wordpress

Then, access it via http://localhost:8080 or [***] in a browser.

When running WordPress with TLS behind a reverse proxy such as NGINX which is responsible for doing TLS termination, be sure to set X-Forwarded-Proto appropriately (see "Using a Reverse Proxy" in "Administration Over SSL" in upstream's documentation). No additional environment variables or configuration should be necessary (this image automatically adds the noted HTTP_X_FORWARDED_PROTO code to wp-config.php if any of the above-noted environment variables are specified).

If your database requires SSL, WordPress ticket #28625 has the relevant details regarding support for that with WordPress upstream. As a workaround, the "Secure DB Connection" plugin can be extracted into the WordPress directory and the appropriate values described in the configuration of that plugin added in wp-config.php.

Docker Secrets

As an alternative to passing sensitive information via environment variables, _FILE may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files. For example:

console
$ docker run --name some-wordpress -e WORDPRESS_DB_PASSWORD_FILE=/run/secrets/mysql-root ... -d wordpress:tag

Currently, this is supported for WORDPRESS_DB_HOST, WORDPRESS_DB_USER, WORDPRESS_DB_PASSWORD, WORDPRESS_DB_NAME, WORDPRESS_AUTH_KEY, WORDPRESS_SECURE_AUTH_KEY, WORDPRESS_LOGGED_IN_KEY, WORDPRESS_NONCE_KEY, WORDPRESS_AUTH_SALT, WORDPRESS_SECURE_AUTH_SALT, WORDPRESS_LOGGED_IN_SALT, WORDPRESS_NONCE_SALT, WORDPRESS_TABLE_PREFIX, and WORDPRESS_DEBUG.

... via docker compose

Example compose.yaml for wordpress:

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:

Run docker compose up, wait for it to initialize completely, and visit http://localhost:8080 or [***] (as appropriate).

Adding additional libraries / extensions

This image does not provide any additional PHP extensions or other libraries, even if they are required by popular plugins (e.g. it cannot send e-mails). There are an infinite number of possible plugins, and they potentially require any extension PHP supports. Including every PHP extension that exists would dramatically increase the image size.

If you need additional PHP extensions, you'll need to create your own image FROM this one. The documentation of the php image explains how to compile additional extensions. Additionally, an older Dockerfile for wordpress has a simplified example of doing this and a newer version of that same Dockerfile has a much more thorough example.

Include pre-installed themes / plugins

Mount the volume containing your themes or plugins to the proper directory; and then apply them through the "wp-admin" UI. Ensure read/write/execute permissions are in place for the user:

  • Themes go in a subdirectory in /var/www/html/wp-content/themes/
  • Plugins go in a subdirectory in /var/www/html/wp-content/plugins/

If you wish to provide additional content in an image for deploying in multiple installations, place it in the same directories under /usr/src/wordpress/ instead (which gets copied to /var/www/html/ on the container's initial startup).

Static image / updates-via-redeploy

The default configuration for this image matches the official WordPress defaults in which automatic updates are enabled (so the initial install comes from the image, but after that it becomes self-managing within the /var/www/html/ data volume).

If you wish to have a more static deployment (similar to other containerized applications) and deploy new containers to update WordPress + themes/plugins, then you'll want to use something like the following (and run the resulting image read-only):

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/

For FPM-based images, remove the find instruction and adjust the SCRIPT_FILENAME paths in your reverse proxy from /var/www/html to /usr/src/wordpress.

Run the result read-only, providing writeable storage for /tmp, /run, and (optionally) wp-content/uploads:

console
$ 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

Note: be sure to rebuild and redeploy regularly to ensure you get all the latest WordPress security updates.

Running as an arbitrary user

See the "Running as an arbitrary user" section of the php image documentation.

When running WP-CLI via the cli variants of this image, it is important to note that they're based on Alpine, and have a default USER of Alpine's www-data, whose UID is 82 (compared to the Debian-based WordPress variants whose default effective UID is 33), so when running wordpress:cli against an existing Debian-based WordPress install, something like --user 33:33 is likely going to be necessary (possibly also something like -e HOME=/tmp depending on the wp command invoked and whether it tries to use ~/.wp-cli). See docker-library/wordpress#256 for more discussion around this.

Configuring PHP directives

See the "Configuration" section of the php image documentation.

For example, to adjust common php.ini flags like upload_max_filesize, you could create a custom.ini with the desired parameters and place it in the $PHP_INI_DIR/conf.d/ directory:

dockerfile
FROM wordpress:tag
COPY custom.ini $PHP_INI_DIR/conf.d/

Image Variants

The wordpress images come in many flavors, each designed for a specific use case.

wordpress:<version>

This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.

wordpress:<version>-fpm

This variant contains PHP's FastCGI Process Manager (FPM), which is the recommended FastCGI implementation for PHP.

In order to use this image variant, some kind of reverse proxy (such as NGINX, Apache, or other tool which speaks the FastCGI protocol) will be required.

WARNING: the FastCGI protocol is inherently trusting, and thus extremely insecure to expose outside of a private container network -- unless you know exactly what you are doing (and are willing to accept the extreme risk), do not use Docker's --publish (-p) flag with this image variant.

FPM configuration

This variant has a few FPM configuration files, each providing a small set of directives.

  • /usr/local/etc/php-fpm.conf: This is the PHP upstream-provided main configuration file. The only thing that isn't commented out is the include for php-fpm.d/*.conf under the [global] section.
  • /usr/local/etc/php-fpm.d/docker.conf: This is image specific configuration that makes FPM easier to run under Docker. With understanding, these may be overridden in user provided configuration.
  • /usr/local/etc/php-fpm.d/[***]: This is the PHP upstream-provided www pool configuration with minor modifications for the image. This may be edited, replaced, or overridden in later configuration files as needed.
  • /usr/local/etc/php-fpm.d/zz-docker.conf: As of January 2026, this only contains daemonize = no under the [global] directive. This should not be overridden.

It is recommended to place user configuration in its own .conf file within /usr/local/etc/php-fpm.d/. Files are included in glob order, so they are sorted according to the collating sequence in effect in the current locale. Later files can override configuration from previous files. See also FPM's Official Configuration Reference.

Below is an example of adding custom FPM configuration using a Dockerfile.

Dockerfile
FROM php:8-fpm
RUN set -eux; \
	{ \
		echo '[www]'; \
		echo 'pm.status_path = /status'; \
	} > /usr/local/etc/php-fpm.d/my-fpm.conf

Alternatively, a bind-mounted file at runtime can be used as long as the container user (www-data of the image by default) can read it (e.g. --mount type=bind,src=path/to/my-fpm.conf,dst=/usr/local/etc/php-fpm.d/my-fpm.conf on docker run). Special care must be taken when mounting a folder of configuration files over the whole /usr/local/etc/php-fpm.d/ directory (e.g. --mount type=bind,src=path/to/fpm.d/,dst=/usr/local/etc/php-fpm.d/); this replaces the php-fpm.d directory of the image, so any necessary directives from the image-provided configuration files (like daemonize = no) must be in the user-provided files.

Some other potentially helpful resources:

  • Simplified example by @md5
  • Very detailed article by Pascal Landau
  • Stack Overflow discussion
  • Apache httpd Wiki example

wordpress:cli

This image variant does not contain WordPress itself, but instead contains WP-CLI.

The simplest way to use it with an existing WordPress container would be something similar to the following:

console
$ 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

Generally speaking, for WP-CLI to interact with a WordPress install, it needs access to the on-disk files of the WordPress install, and access to the database (and the easiest way to accomplish that such that wp-config.php does not require changes is to simply join the networking context of the existing and presumably working WordPress container, but there are many other ways to accomplish that which will be left as an exercise for the reader).

NOTE: Since March 2021, WordPress images use a customized wp-config.php that pulls the values directly from the environment variables defined above (see wp-config-docker.php in docker-library/wordpress#572 and docker-library/wordpress#577). As a result of reading environment variables directly, the cli container also needs the same set of environment variables to properly evaluate wp-config.php.

License

View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's wordpress/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Deployment & Usage Documentation

Docker 部署 WordPress 全流程教程

WordPress 是全球最流行的开源内容管理系统(CMS),基于 PHP + MySQL 架构,截至目前,全球超过 43% 的网站使用 WordPress 构建,从个人博客到大型媒体平台(如《纽约时报》部分栏目)均有应用,是入门建站和快速迭代业务的首选工具。

Read More
查看更多 wordpress 相关镜像 →
bitnami/wordpress logo
bitnami/wordpress
bitnami
Bitnami Secure Image for WordPress是由Bitnami提供的适用于WordPress的安全优化镜像,其集成预配置的安全防护设置、自动漏洞更新机制、SSL证书支持及基础防火墙功能,可有效降低恶意攻击与数据泄露风险,同时优化服务器资源分配与运行性能,确保WordPress网站快速稳定部署,且兼容主流云平台与本地服务器环境,为用户提供开箱即用的安全可靠建站解决方案。
281 次收藏1亿+ 次下载
30 天前更新
bitnamicharts/wordpress logo
bitnamicharts/wordpress
bitnamicharts
Bitnami提供的WordPress Helm Chart,用于在Kubernetes环境中简化WordPress的部署与管理。
2 次收藏100万+ 次下载
30 天前更新
elestio/wordpress logo
elestio/wordpress
elestio
Elestio验证并打包的WordPress,是用于搭建网站的内容管理系统。
6 次收藏1万+ 次下载
1 个月前更新
secoresearch/wordpress logo
secoresearch/wordpress
secoresearch
集成Apache、PHP、Varnish和WordPress的Docker镜像,用于快速部署高性能WordPress网站,Varnish提供缓存加速以提升访问速度和系统响应能力。
10万+ 次下载
5 个月前更新
shinsenter/wordpress logo
shinsenter/wordpress
shinsenter
基于PHP的Wordpress生产就绪Docker镜像,具备自动Wordpress安装功能。
5 次收藏10万+ 次下载
17 天前更新
chainguard/wordpress logo
chainguard/wordpress
chainguard
使用Chainguard的低至零CVE容器镜像构建、交付和运行安全软件。
1万+ 次下载
17 天前更新

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

docker search 报错:专属域名下仅支持 Docker Hub 查询

docker search 报错问题

网页搜不到镜像:Docker Hub 有但轩辕镜像搜索无结果

镜像搜索不到

离线传输镜像:无法直连时用 docker save/load 迁移

离线传输镜像

Docker 插件安装错误:application/vnd.docker.plugin.v1+json

Docker 插件安装错误

WSL 下 Docker 拉取慢:网络与挂载目录影响及优化

WSL 拉取镜像慢

轩辕镜像是否安全?镜像完整性校验(digest)说明

镜像安全性

如何用轩辕镜像拉取镜像?登录方式与专属域名配置

如何拉取镜像

错误码与失败问题

manifest unknown 错误:镜像不存在或标签错误

manifest unknown 错误

TLS/SSL 证书验证失败:Docker pull 时 HTTPS 证书错误

TLS 证书验证失败

DNS 解析超时:无法解析镜像仓库地址或连接超时

DNS 解析超时

410 Gone 错误:Docker 版本过低导致协议不兼容

410 错误:版本过低

402 Payment Required 错误:流量耗尽错误提示

402 错误:流量耗尽

401 UNAUTHORIZED 错误:身份认证失败或登录信息错误

身份认证失败错误

429 Too Many Requests 错误:请求频率超出专业版限制

429 限流错误

Docker login 凭证保存错误:Cannot autolaunch D-Bus(不影响登录)

凭证保存错误

账号 / 计费 / 权限

免费版与专业版区别:功能、限额与使用场景对比

免费版与专业版区别

支持的镜像仓库:Docker Hub、GCR、GHCR、K8s 等列表

轩辕镜像支持的镜像仓库

拉取失败是否扣流量?计费规则说明

拉取失败流量计费

KYSEC 权限不够:麒麟 V10/统信 UOS 下脚本执行被拦截

KYSEC 权限错误

如何申请开具发票?(增值税普票/专票)

开具发票

如何修改网站与仓库登录密码?

修改网站和仓库密码

配置与原理类

registry-mirrors 未生效:仍访问官方仓库或报错的原因

registry-mirrors 未生效

如何去掉镜像名称中的轩辕域名前缀?(docker tag)

去掉域名前缀

如何拉取指定架构镜像?(ARM64/AMD64 等多架构)

拉取指定架构镜像

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
Docker 官方镜像
...
library/wordpress
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.