This question has been archived.

Docker Wordpress site question

February 19, 2016 3.2k views
WordPress Deployment Docker

Hi perhaps someone here can help me with this have scoured Wordpress help and a variety of other sources with no luck.

I set up a Wordpress site in a docker container in a droplet and it appeared all to be working fine, more or less. Then I went to map a domain name to my nice new site which also works ok except it shows the IP after the redirect rather than the domain name. If I follow the Wordpress recommended instructions then the site is no longer accesible. I checked both wordpress.com and wordpress.org help but not useful.

Anyone have any ideas?

Rodney

8 comments
  • Are you using LAMP or LEMP with docker?

  • A bit new to this neither as far as I know.

    I installed docker not using the pre-configured image, then installed Wordpress again no pre-configured image but from the command line. I basically followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-and-phpmyadmin-with-docker-compose-on-ubuntu-14-04

    by Nik van der Ploeg
    This article provides a real-world example of using Docker Compose to install an application, in this case WordPress with PHPMyAdmin as an extra. WordPress normally runs on a LAMP stack, which means Linux, Apache, MySQL/MariaDB, and PHP. The official WordPress Docker image includes Apache and PHP for us, so the only part we have to worry about is MariaDB.
  • @rbeard - For reference, that tutorial used a wordpress container that includes embedded Apache and PHP. I think you need to set the ServerName with a FQDN value in the Wordpress configuration.

  • Yes, I thought of that but it doesn't seem to do the trick. Site is not accessible when I change it where I am supposed to. I am pretty sure the problem is with my configuration which is why I posted here. The redirect is working well enough.

  • I am wondering if I can define the host mapping in the docker-compose.yaml? It appears his is possible. Will try and see if it works.

  • @rbeard - I didn't have to do that for it to work for me, but try anyway. I'm starting to think this has something to do with your DNS entries.

  • Yes I think you are correct. I couldn't find a wp_config.php file so tried to fix things in wordpress admin and phpadmin but that is what hasn't been working. Thanks for your help might be on the right track now.

  • Well I finally worked out that I probably need to add the hostname and siteurl to wp-config.php but am unable to edit it and changing mode isn't working. I hadn't sett the DNS entries but even after doing that the problem is not fixed.

Be the first one to answer this question.