-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wordpress Environment for Multi-Site Setup #195
Comments
If you just need to deploy a WordPress multi-site instance, I'd recommend using this image as-is and then modifying the If you instead need a repeatable image you can deploy in many places with Multisite pre-enabled, then you'll need to modify the file FROM wordpress
RUN sed -r -e 's/\r$//' /usr/src/wordpress/wp-config-sample.php \
| awk '/^\/\*.*stop editing.*\*\/$/ { print("define( \"WP_ALLOW_MULTISITE\", true );") } { print }' > temp.php \
&& chown --reference /usr/src/wordpress/wp-config-sample.php temp.php \
&& mv temp.php /usr/src/wordpress/wp-config-sample.php |
Thank you so much for your reply. I was able to use your suggestion in the second paragraph. I couldn't get it done with the first advice as I could not locate the wp-config.php file. I will be glad if Can you please direct me on how to locate it? |
In general, |
Thank you all for the reply. I am still having a bit of problem with wordpress multisite. I have been able to enable the multi site features. But whenever I create a new site, it doesn't allow me to access it ( It shows as a broken page). I can only access the main site in the multisite page. Is this because I am using docker? I am only allowed to use the sub directory form of creating multisite |
That likely depends on how you're routing traffic to it -- how are your domain names set up? Do you have something like NGINX in front, or are you simply letting the WordPress container listen directly on port 80? Is traffic for all your domains being routed to the container appropriately? |
Thank you for your reply. I am not using nginx, the wordpress container listens directly on port 80 and the database container listens on port 8181. wordpresscontainer:
build: ./php/
links:
- wordpressdb:mysql
ports:
- 80:80
wordpressdb:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: password
phpmyadmincontainer:
image: corbinu/docker-phpmyadmin
links:
- wordpressdb:mysql
ports:
- 8181:80
environment:
MYSQL_USERNAME: root
MYSQL_ROOT_PASSWORD: password I don't understand your last question about traffice routed to the container. Also, the setup allows me to only use sub-directory for the multi-site setup. Thanks and look forward to your reply. |
Sorry for the delay. The only thing I can recommend from here is reading through https://codex.wordpress.org/Create_A_Network and making sure you've followed the steps as described. In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow (or even the WordPress forums, to try and catch more WordPress users than these Docker forums might). |
Hi There,
I am new to creating and extending docker images. I would like to build a wordpress container with the multi-site feature. The current and usual one is the default wordpress setting.
Can you please direct me on how to go about it.
Thanks.
The text was updated successfully, but these errors were encountered: