WordPress Docker Image赢得了Azure上传限制的增加

发布于 2025-02-07 02:10:39 字数 178 浏览 1 评论 0原文

我在Azure App Service上有一个WordPress映像。我直接从Docker Hub安装了WordPress。我没有使用Docker组成。我将使用的主题的文件大小很大。因此,我想增加WordPress文件上传限制和时间。但是我不知道该怎么做。

我可以通过定义像wp_config_extra这样的值来做到这一点吗?

I have a WordPress image on Azure App Service. I installed WordPress directly from the docker hub. I didn't use Docker compose. The file size of the theme I will use is large. For this reason, I want to increase the WordPress file upload limit and time. But I don't know how to do this.

Can I do it by defining a value like WP_CONFIG_EXTRA?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少年亿悲伤 2025-02-14 02:10:39

按 @f1linux post

尝试以下面的方式更改docker-compose.yml

  • 创建uploads.ini带有以下设置:
file_uploads = On  
memory_limit = 64M  
upload_max_filesize = 64M  
post_max_size = 64M  
max_execution_time = 600  
  • 创建dockerfile-php
FROM wordpress:5.8.2  
COPY ./uploads.ini /usr/local/etc/php/conf.d  
  • add 构建 docker-compose.yml 转介dockerfile-php依次引用uploads.ini
wordpress:  
build:  
context: .  
dockerfile: Dockerfile-php  
depends_on:  
- db  
image: wordpress:5.8.2  
<snippity snip>  

使用所有文件运行Docker-Compose Directory:(

docker-compose down && docker-compose up -d --build  

)交替:

修改网络管理设置以增加值。

  • 选择网络管理=&gt;设置=&gt;向下滚动到上传设置节,修改最大上传文件大小,然后按保存更改

请参考“ nofollow noreferrer”> a>有关更多信息。

As per @F1Linux post,

Try to change the docker-compose.yml in the following way:

  • Create uploads.ini with below settings:
file_uploads = On  
memory_limit = 64M  
upload_max_filesize = 64M  
post_max_size = 64M  
max_execution_time = 600  
  • Create Dockerfile-php:
FROM wordpress:5.8.2  
COPY ./uploads.ini /usr/local/etc/php/conf.d  
  • Add build config of docker-compose.yml which refers Dockerfile-php which in turn refers uploads.ini:
wordpress:  
build:  
context: .  
dockerfile: Dockerfile-php  
depends_on:  
- db  
image: wordpress:5.8.2  
<snippity snip>  

Run the docker-compose directory with all files:

docker-compose down && docker-compose up -d --build  

(OR) Alternatively:

Modify the Network Admin Settings to increase the value.

  • Select Network Admin => Settings=> Scroll down to the Upload Setting section, modify the Max upload file size then press Save Changes.

Please refer Update PHP settings for more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文