Roots Discourse

Deploy error: Aborted trying to redefine constance 'MULTISITE'

First a note on what I’m trying to achieve: I currently run a WordPress network (using similar plugins/themes/functionality) that I’m trying to cross over to using the Roots stack. This network contains multiple sites that are mapped to domains. I’m currently running everything on a DigitalOcean droplet.

I believe that I’ve correctly provisioned my remote server according to the to the documentation, but when I attempt to deploy I receive this error:

non-zero return code
PHP Fatal error:  Uncaught
Roots\WPConfig\Exceptions\ConstantAlreadyDefinedException: Aborted trying to
redefine constant 'MULTISITE'. `define('MULTISITE', ...)` has already been
occurred elsewhere. in
Stack trace:
#0 /srv/www/
config/src/Config.php(26): Roots\WPConfig\Config::defined('MULTISITE')
#1 /srv/www/
p(114): Roots\WPConfig\Config::define('MULTISITE', true)
#2 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1150) :
eval()'d code(7): require_once('/srv/www/hypecr...')
#3 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1150):
#4 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1111):
#5 phar:///usr/bin/wp/vendor/wp-cli/wp-
cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#6 phar:///usr/bin/wp/vendor/wp-cli/w in
config/src/Config.php on line 106
fatal: []: FAILED! => {"changed": false, "cmd": ["wp", "core", "is-installed", "--skip-plugins", "--skip-themes", "--require=/srv/www/"], "delta": "0:00:00.104108", "end": "2019-05-12 08:02:01.075944", "failed_when_result": true, "rc": 255, "start": "2019-05-12 08:02:00.971836", "stderr_lines": ["PHP Fatal error:  Uncaught Roots\\WPConfig\\Exceptions\\ConstantAlreadyDefinedException: Aborted trying to redefine constant 'MULTISITE'. `define('MULTISITE', ...)` has already been occurred elsewhere. in /srv/www/", "Stack trace:", "#0 /srv/www/ Roots\\WPConfig\\Config::defined('MULTISITE')", "#1 /srv/www/ Roots\\WPConfig\\Config::define('MULTISITE', true)", "#2 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1150) : eval()'d code(7): require_once('/srv/www/hypecr...')", "#3 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1150): eval()", "#4 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1111): WP_CLI\\Runner->load_wordpress()", "#5 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\\Runner->start()", "#6 phar:///usr/bin/wp/vendor/wp-cli/w in /srv/www/ on line 106"], "stdout": "", "stdout_lines": []}

I’m having quite a bit of trouble trying to figure out the solution, any knowledge would be much appreciated!

I fixed this, but it was little bit of a pain.

Well, what’d ya do…? :kissing_heart:

This topic was automatically closed after 42 days. New replies are no longer allowed.