Galaxy undefined constant WPMU_PLUGIN_URL
djwave28 opened this issue · 2 comments
WP5.2 | mu-plugin | TypeRocket 4
I followed the YouTube instructional videos.
I wanted to create the first controller with galaxy, but got greeted with and error.
command: php galaxy make:controller thin Custom
PHP Warning: Use of undefined constant WPMU_PLUGIN_URL - assumed 'WPMU_PLUGIN_URL' (this will throw an Error in a future version of PHP) in .../wp-content/mu-plugins/typerocket/config/paths.php
The controller does get created. What can I do to resolve this?
I have experienced this issue on both Mac OS and Linux installs. The problem is basically described as is, a missing constant WPMU_PLUGIN_URL.
After giving this another thought I came up with the fact that the galaxy command runs in the terminal calling the galaxy script on the typerocket root.
I was able to solve this issue by adding the following lines.
if (!defined('WPMU_PLUGIN_URL')) {
define('WPMU_PLUGIN_URL', '/mu-plugins');
}
Place these lines in one of the following locations
- ./config/galaxy.php - top of the script
- ./galaxy - (bash script) top of script
I seems to me this should be addressed in the source code as a standard.