“WordPress Connection Information” on WP that is running in container


A WordPress website can be install and run on container environment, like docker, k8s,…

In this guide, the WordPress image to be used is apache based xxx-apache , which is running in a docker container/k8s, also EC2 AWS with docker – all cases are container based.

May we can not upgrade WordPress, plugins, install new plugins, delete unsed plugins,… from WP admin dashboard with message relative to write permission.


Photo: Nam Le on Flickr

In non-docker environment, the same problem can be fixed by the command:

chown apache:apache /path/to/wp

Now on container evironment, wordpress asking for ftp details because wordpress doesn’t have permission to write in your server.

Taking a look to the wordpress Dockerfile, there is a line that defined the user to use:

USER www-data

So, we access to the pod inside the container wordpress, perform the following command to make the ownership changes are applied to all files and subdirectories recursively:

chown -R www-data /var/www

Now, coming back to the WP Admin Dashboard, all messages about permission are disapeared.

Nam Le.


Leave a Reply