Skip to content
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

Inject configuration using environment variable #142

Merged
merged 2 commits into from
Jul 30, 2018
Merged

Inject configuration using environment variable #142

merged 2 commits into from
Jul 30, 2018

Conversation

lwille
Copy link

@lwille lwille commented Apr 24, 2016

Alternative solution to #8. Not passing in WORDPRESS_CONFIG_EXTRA won't break anything.

Here's an excerpt from my multisite docker-compose.yaml with WORDPRESS_CONFIG_EXTRA:

 wordpress_fpm:
    image: nonstop-wordpress:4.5-fpm
    links:
      - wordpress_db:mysql
    environment:
      WORDPRESS_DB_HOST: mysql
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: ...
      WORDPRESS_DB_NAME: wordpress
      WORDPRESS_CONFIG_EXTRA: |
        /* Multisite */
        define('WP_ALLOW_MULTISITE', true );
        define('MULTISITE', true);
        define('SUBDOMAIN_INSTALL', false);
        define('DOMAIN_CURRENT_SITE', 'localhost'); // TODO: change to actual domain when deploying
        define('PATH_CURRENT_SITE', '/');
        define('SITE_ID_CURRENT_SITE', 1);
        define('BLOG_ID_CURRENT_SITE', 1);

The generated wp-config.php looks like this (excerpt):

// ...
// If we're behind a proxy server and using HTTPS, we need to alert Wordpress of that fact
// see also http://codex.wordpress.org/Administration_Over_SSL#Using_a_Reverse_Proxy
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
    $_SERVER['HTTPS'] = 'on';
}
/* Multisite */
define('WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'localhost'); // TODO: change to actual domain when deploying
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

/* That's all, stop editing! Happy blogging. */



/** Absolute path to the WordPress directory. */

@nithin-bose
Copy link

I really hope this PR would be merged. I don't see any point in making new images just for config changes, especially since this PR would let me do the same without any overhead or major impact.

What is stopping this PR from being merged??

@simonwh
Copy link

simonwh commented Aug 9, 2017

Great idea, why not merge it?

@l00ptr
Copy link

l00ptr commented Oct 6, 2017

Yeah it could be nice to add some extra config that way. I want to force and set the https.

@drzraf
Copy link

drzraf commented Feb 19, 2018

ping @tianon @marsjaninzmarsa
It's one of the most needed feature request for the WordPress Docker image.
We can't think of any WordPress not having custom defines inside wp-config.php

... or, at least, allow to bind mount wp-config.php

@lwille
Copy link
Author

lwille commented Mar 3, 2018

Just rebased this branch in the hope of a timely merge, and wrapped the WORDPRESS_EXTRA_CONFIG variable in an extra heredoc to not interfere with PHP parsing.

@luiscoms
Copy link
Contributor

Hi, I`ve tested your change, and it works but for php5.6 you need to update this file

php5.6/apache/docker-entrypoint.sh

@lwille
Copy link
Author

lwille commented Mar 23, 2018

Right! It's just a copy though, so it was an easy thing to do 😄 I also updated the other entrypoint files.

@luiscoms
Copy link
Contributor

This error raises when WORDPRESS_ADDITIONAL_CONFIG is missing

/usr/local/bin/docker-entrypoint.sh: line 138: WORDPRESS_ADDITIONAL_CONFIG: unbound variable

To fix this you need to change to ${WORDPRESS_ADDITIONAL_CONFIG:=} on line 138

@lwille
Copy link
Author

lwille commented Mar 25, 2018

d'uh! Thanks for the tipp @luiscoms 👍

@scottbasgaard
Copy link

Looking forward to this!

@kaayru
Copy link

kaayru commented Apr 16, 2018

Nice addition! Is this going to be approved and merged soon?

@lwille
Copy link
Author

lwille commented Apr 16, 2018

rebased to keep this branch fresh and ready to be merged

@1gor
Copy link

1gor commented Apr 17, 2018

Much needed feature.

What prevents it from being merged?

@lwille
Copy link
Author

lwille commented Apr 17, 2018

@tianon Can we have a decision? I'd like to strike this off my list of open things ;-)

@acuthbert
Copy link

Need to get a setup a multisite instance using docker for internal development - really need this merged! Pretty please?

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the long delay -- we've oscillated a lot on how to resolve the issue of users providing additional configuration to this image specifically because it's a bit complicated and everyone seems to have a slightly different opinion on how they'd like that to work.

I think this PR provides the best compromise, so I'd like to move forward on it. 👍

@@ -128,14 +128,15 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
sed -ri -e 's/\r$//' wp-config*

if [ ! -e wp-config.php ]; then
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP' <<EOBASH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This multi-heredoc syntax seemed too good to be true, so I tested and it does appear to be too good to be true: 😞

$ cat <<EOF1 <<EOF2
> hi
> EOF1
> hi2u
> EOF2
hi2u

It appears the second overwrites the first. However, all three implementations of awk that I tested (busybox, mawk, and gawk) include an ENVIRON variable which we can use. Here's my suggested modification:

awk '
	/^\/\*.*stop editing.*\*\/$/ && c == 0 {
		c = 1
		system("cat")
		if (ENVIRON["WORDPRESS_ADDITIONAL_CONFIG"]) {
			print ENVIRON["WORDPRESS_ADDITIONAL_CONFIG"]
		}
	}
	{ print }
' wp-config-sample.php > wp-config.php <<'EOPHP'
...
EOPHP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, the actual implementation works for me

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im using different heredoc styles, maybe that’s why 🤔

@lwille
Copy link
Author

lwille commented Apr 21, 2018

proof:

cat <<'FOO' <<BAR
heredoc> this is a foo
heredoc> FOO
heredoc> this is a bar
heredoc> BAR
this is a foo
this is a bar

squashed my commits.

edit: my proof is only working in zsh. What a shame 🤦‍♂️

@cvrabie
Copy link

cvrabie commented Jun 5, 2018

Any update? Seems multiple feature requests have been closed in favour of this then it all went quiet.

@nickredmark
Copy link

nickredmark commented Jun 8, 2018

I am using the following to autodetect whether the wordpress site url has changed and automatically modify it

in the Dockerfile:

FROM wordpress

RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
    && chmod +x wp-cli.phar \
    && mv wp-cli.phar /usr/local/bin/wp

COPY docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]

I had to copy the docker-entrypoint.sh and add the following lines just before the configs are cleared out

	WPR="wp --allow-root"
        # Remove the following command if you want to install wordpress from the web interface
	$WPR core install \
		--url="$WORDPRESS_SITE_URL" \
		--title="$WORDPRESS_TITLE" \
		--admin_user="$WORDPRESS_ADMIN_USER" \
		--admin_email="$WORDPRESS_ADMIN_EMAIL"
	WORDPRESS_CURRENT_SITE_URL=$($WPR option get home)
	echo Site url is $WORDPRESS_CURRENT_SITE_URL
	if [[ $WORDPRESS_CURRENT_SITE_URL != $WORDPRESS_SITE_URL ]]; then
		echo "Site url has changed from $WORDPRESS_CURRENT_SITE_URL to $WORDPRESS_SITE_URL";
		$WPR search-replace $WORDPRESS_CURRENT_SITE_URL $WORDPRESS_SITE_URL --skip-columns=guid
		$WPR option update home $WORDPRESS_SITE_URL
		$WPR option update siteurl $WORDPRESS_SITE_URL
	fi

@lbod
Copy link

lbod commented Jul 24, 2018

Rather than writing a configurable option to pass in any number of wordpress env variables (even though it makes more sense), does it not make sense to just hardcode the envs in the usual way in the entrypoint so you are at least landing something?

It seems daft I can only use a bare minimum of env variables, otherwise I'm faced with creating my own image and entrypoint which takes away the reason for using this image in the first place, ease of use.

@ConstantinElse
Copy link

When this PR is going to be merged ?

@tstricklin-atmosol
Copy link

@lbod:

Rather than writing a configurable option to pass in any number of wordpress env variables (even though it makes more sense), does it not make sense to just hardcode the envs in the usual way in the entrypoint so you are at least landing something?

This could work for a wide range of needs, but it's not a proper full solution unless you hard-code 100% of all possible environment variables. And as WP introduces new variables, this would need to be kept up-to-date.

Personally, I'm all for the solution proposed in this PR.

@reidab
Copy link

reidab commented Nov 27, 2018

Since the README on the Docker hub page links to this issue for more context, it would be nice to edit the top-level description here to reference the final name, WORDPRESS_CONFIG_EXTRA, instead of the outdated WORDPRESS_ADDITIONAL_CONFIG. I just spent an embarrassingly long time trying to figure out why this wasn't working, before realizing that I'd copied the name from the YAML example above.

@morenoh149
Copy link

@reidab it's been updated by @wglambert

@oknoorap

This comment has been minimized.

@yivi
Copy link

yivi commented Dec 19, 2018

I'm adding WORDPRESS_CONFIG_EXTRA to my environment, but the config doesn't get added to my wp-config.php.

    eo_phpblog:
        restart: always
        image: wordpress:4.9.2-php7.2-fpm
        env_file:
            - .env
        environment:
            WORDPRESS_CONFIG_EXTRA
![imagen](https://user-images.githubusercontent.com/1815039/50220827-a849de80-0393-11e9-91fe-fd93d38794b5.png)
: |
                echo "hi";
        volumes:
            - wproot:/var/www/html
            - ./wp-content:/var/www/html/wp-content:rw

If I run env in the container I see that the env variable is set as expected:
imagen

But if I see the generated wp-config.php, my extra config is nowhere to be seen:
imagen

What am I doing wrong?

Answer: Being silly. That's what I'm doing wrong. The image I'm using does not support WORDPRESS_CONFIG_EXTRA. Does any version < 5.0.0 support this?

Finally: From version 4.9.7 onwards this is supported. Not for earlier versions. Leaving this here just in case some other lost soul can profit from my clumsiness.

@jakobojvind
Copy link

I had a similar problem with WORDPRESS_CONFIG_EXTRA.

To reproduce my problem (an, update docker-compose.yml scenario)
Try to perform these steps.

  1. create the docker-compose.yml file without having the WORDPRESS_CONFIG_EXTRA included.
  2. execute docker-compose up -d
  3. execute docker-compose down
  4. add the WORDPRESS_CONFIG_EXTRA to the docker-compose.yml file
  5. execute docker-compose up -d

Now the wp-config.php does not include the WORDPRESS_CONFIG_EXTRA content,

My solution was

  1. delete all from WP_CORE directory which maps to /var/www/html/* except the wp-content directory.
  2. execute docker-compose up -d

Now the wp-config.php does include the WORDPRESS_CONFIG_EXTRA content.

@tianon
Copy link
Member

tianon commented Jan 15, 2019

For cases where this doesn't seem to be taking effect, if you check your container logs you'll likely see the warning that was added in #342. 👍

The solutions are either to not mount a previous install (let the script provide the initial wp-config.php content again) or to modify your existing wp-config.php directly.

If you'd like a solution that will update dynamically from an environment variable, see the eval(getenv(...))-based solution in #333 (comment).

@SloCompTech
Copy link

If anyone gets an database error when trying to configure multisite with:

WORDPRESS_CONFIG_EXTRA: |
        /* Multisite */
        define('WP_ALLOW_MULTISITE', true );
        define('MULTISITE', true);
        define('SUBDOMAIN_INSTALL', false);
        define('DOMAIN_CURRENT_SITE', 'localhost'); // TODO: change to actual domain when deploying
        define('PATH_CURRENT_SITE', '/');
        define('SITE_ID_CURRENT_SITE', 1);
        define('BLOG_ID_CURRENT_SITE', 1);

use this instead

WORDPRESS_CONFIG_EXTRA: |
        /* Multisite */
        define('WP_ALLOW_MULTISITE', true );

then manualy go via Tools -> Network setup

If anyone interested in stacktrace:

wordpress    | [Wed Feb 06 22:29:36.974734 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:36 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:36.985228 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:36 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:36.988984 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:36 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:36.993253 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:36 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.000611 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:36 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.004398 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.008309 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.015543 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.019676 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.023868 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.028499 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.033316 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.037521 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.041573 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.046974 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.052165 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.056134 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.060214 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.065120 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:29:37.069275 2019] [php7:notice] [pid 214] [client 172.17.0.1:36116] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/wp-signup.php/', '/' )  ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:29:37 +0100] "GET /wp-signup.php?new=domain.com HTTP/1.1" 302 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:13.995834 2019] [php7:notice] [pid 215] [client 172.17.0.1:36170] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:13.996061 2019] [php7:notice] [pid 215] [client 172.17.0.1:36170] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:13 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:56.312656 2019] [php7:notice] [pid 213] [client 172.17.0.1:36180] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:56.313052 2019] [php7:notice] [pid 213] [client 172.17.0.1:36180] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:56 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:56.873013 2019] [php7:notice] [pid 223] [client 172.17.0.1:36186] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:56.873282 2019] [php7:notice] [pid 223] [client 172.17.0.1:36186] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:56 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:57.478176 2019] [php7:notice] [pid 224] [client 172.17.0.1:36192] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:57.478409 2019] [php7:notice] [pid 224] [client 172.17.0.1:36192] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:57 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:57.661326 2019] [php7:notice] [pid 221] [client 172.17.0.1:36198] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:57.661602 2019] [php7:notice] [pid 221] [client 172.17.0.1:36198] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:57 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:57.843971 2019] [php7:notice] [pid 212] [client 172.17.0.1:36204] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:57.844244 2019] [php7:notice] [pid 212] [client 172.17.0.1:36204] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:57 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:58.012477 2019] [php7:notice] [pid 230] [client 172.17.0.1:36210] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:58.012768 2019] [php7:notice] [pid 230] [client 172.17.0.1:36210] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:58 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:58.181912 2019] [php7:notice] [pid 216] [client 172.17.0.1:36216] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:58.182280 2019] [php7:notice] [pid 216] [client 172.17.0.1:36216] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:58 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:58.361337 2019] [php7:notice] [pid 220] [client 172.17.0.1:36222] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:58.361551 2019] [php7:notice] [pid 220] [client 172.17.0.1:36222] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:58 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:30:58.513746 2019] [php7:notice] [pid 214] [client 172.17.0.1:36228] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:30:58.514116 2019] [php7:notice] [pid 214] [client 172.17.0.1:36228] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:30:58 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:31:31.414814 2019] [php7:notice] [pid 215] [client 172.17.0.1:36234] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids
wordpress    | [Wed Feb 06 22:31:31.415045 2019] [php7:notice] [pid 215] [client 172.17.0.1:36234] WordPress database error Table 'wordpress.wp_site' doesn't exist for query SELECT  wp_site.id FROM wp_site  WHERE wp_site.domain IN ( 'domain.com', 'com' ) AND wp_site.path IN ( '/' )  ORDER BY CHAR_LENGTH(wp_site.domain) DESC, CHAR_LENGTH(wp_site.path) DESC  made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, WP_Network::get_by_path, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids
wordpress    | 172.17.0.1 - - [06/Feb/2019:22:31:31 +0100] "GET / HTTP/1.1" 500 557 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
wordpress    | [Wed Feb 06 22:31:32.527017 2019] [php7:notice] [pid 213] [client 172.17.0.1:36240] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'domain.com' ) AND path IN ( '/' )  ORDER BY blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids

@r4ym0n
Copy link

r4ym0n commented Mar 29, 2019

HI, all. here got bug about this feature , If I set the cofig. below. the $_SERVER MICRO will be IGNORED in the wp-config.php

WORDPRESS_CONFIG_EXTRA: |
          define('WP_CACHE', false );
          define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
          define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);

IN wp-config.php

// WORDPRESS_CONFIG_EXTRA
/* Multisite */
define('WP_SITEURL', 'http://' . ['HTTP_HOST']);
define('WP_HOME', 'http://' . ['HTTP_HOST']);

SO, when I access the website, It will redirect to array/path/to/wp

@tianon
Copy link
Member

tianon commented Mar 29, 2019

@quartz010 you've got something else swallowing your $_SERVER (likely docker-compose or bash, depending on how you're running your container)

For further help, please try the Docker Community Forums, the Docker Community Slack, or Stack Overflow (these issues are not a support forum and this feature is confirmed to be working properly for other users).

@luiscoms
Copy link
Contributor

luiscoms commented Apr 1, 2019

You can scape $ dollar with double $$ dollars

@r4ym0n
Copy link

r4ym0n commented Apr 1, 2019

You can scape $ dollar with double $$ dollars

☆⌒(*^-゜)v THX!! Solved!

@chharish
Copy link

chharish commented May 27, 2019

I get database error "Error establishing a database connection"

......
......
WORDPRESS_TABLE_PREFIX: poy_
     WORDPRESS_CONFIG_EXTRA: |
       /* Multisite */
       define('WP_ALLOW_MULTISITE', true );
       define('MULTISITE', true);
       define('SUBDOMAIN_INSTALL', false);
       define('DOMAIN_CURRENT_SITE', 'www.foo.bar'); // TODO: change to actual domain when deploying
       define('PATH_CURRENT_SITE', '/');
       define('SITE_ID_CURRENT_SITE', 1);
       define('BLOG_ID_CURRENT_SITE', 1);
......
......

@spencerdcarlson
Copy link

spencerdcarlson commented Dec 6, 2019

What am I missing here?

When trying to setup a multisite docker wordpress instance I get the following error after hitting http://localhost:8080

WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT wp_blogs.blog_id FROM wp_blogs WHERE domain = 'localhost:8080' AND path = '/' ORDER BY wp_blogs.blog_id ASC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->get_site_ids

docker-compose.yaml

version: '3.7'
services:
  wordpress-cli:
    image: wordpress:cli
    container_name: wordpress-cli
    depends_on:
      - wordpress
    volumes:
      - wordpress:/var/www/html
  wordpress:
    image: wordpress
    container_name: wordpress
    ports:
      - "8080:80"
    environment:
      WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST:-db:3306}
      WORDPRESS_DB_USER: ${WORDPRESS_DB_USER:-wp_admin}
      WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
      WORDPRESS_CONFIG_EXTRA: |
        /* Multisite */
        define('WP_ALLOW_MULTISITE', true );
        define('MULTISITE', true);
        define('SUBDOMAIN_INSTALL', false);
        define('DOMAIN_CURRENT_SITE', 'localhost'); 
        define('PATH_CURRENT_SITE', '/');
        define('SITE_ID_CURRENT_SITE', 1);
        define('BLOG_ID_CURRENT_SITE', 1);
    depends_on:
      - db
    volumes:
      - wordpress:/var/www/html
  db:
    image: mysql:8.0.18
    container_name: db
    command: --default-authentication-plugin=mysql_native_password
    ports:
      - "3306:3306"
    environment:
      MYSQL_DATABASE: wordpress
      MYSQL_USER: ${WORDPRESS_DB_USER:-wp_admin}
      MYSQL_PASSWORD: ${WORDPRESS_DB_PASSWORD}
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
    volumes:
      - wordpress-db:/var/lib/mysql
      - ./data/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d

volumes:
  wordpress-db:
    name: wordpress-db
  wordpress:
    name: wordpress

.env

WORDPRESS_DB_PASSWORD=whatever-you-want
MYSQL_ROOT_PASSWORD=whatever-root-pwd-you-want

Why is it trying to access the db before going through the setup process?
The wordpress db doesn't have any tables:

mysql> use wordpress;
Database changed
mysql> show tables;
Empty set (0.01 sec)

If I remove the WORDPRESS_CONFIG_EXTRA section in my docker-compose.yaml file, everything works perfectly and I am prompted through the wordpress / db setup processes.

@lwille, any ideas?

@jamg44
Copy link

jamg44 commented Mar 24, 2020

@spencerdcarlson I had the same issue, and used successfully the workarround proposed above by @SloCompTech

#142 (comment)

@0x00000oak
Copy link

Hey, is there a solution now outside of the workaround mentioned above? Such that all config could be done in the compose file? Thanks in advance

@tianon
Copy link
Member

tianon commented Mar 23, 2021

This implementation was adjusted in #557 / #572 (such that it now should more closely match how most users expected it to function). 👍

@misha-cybertek

This comment was marked as off-topic.

@tianon

This comment was marked as off-topic.

@docker-library docker-library locked as resolved and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.