-
Notifications
You must be signed in to change notification settings - Fork 4
Use of undefined constant WP_ENV #299
Comments
@timostsauber are you using the theme only or did you use the flynt-cli tool to setup the boilerplate + theme? The boilerplate uses bedrock as far as I know which handles environment variables in env files. If the wordpress setup is created manually I think the Because of your second question: It's used here: So the WP_ENV variable is used to make sure this log function is not available in production mode. I'm not sure how to make this easy to use with and without the WP_ENV var without having security or potential performance issues on production systems. Maybe it's just good practice to define a WP_ENV constant and have it documented for non-flynt-cli projects (if it's not documented yet already). Maybe the Bleech team has more insight! Have a nice day! |
@bdbch thank you for the quick reply! That makes sense. I was using the theme only, not the flynt-cli tool this time. I will simply declare the WP_ENV constant in the wp-config.php file, as thats the simplest solution, and seems to work perfectly. The reason I'm just running the theme only is that I wasn't able to get the flynt-cli tool to work with Local by Flywheel app. I use Flywheel for a lot of our sites, and it has a prescriptive way of generating boilerplate WordPress sites (its own folder structure etc), and I haven't figured out a way to run the Flynt-cli tool in unison with it. I don't suppose you, or the Bleech team, have run across this before? |
@timostsauber great! have fun working with flynt! :) Really changed how I build WP websites. Never heard of Flywheel yet, but I'm going to check it out and see if I can get it to work with the flynt-cli. Seems like a nice tool for easy dev project management! |
Thanks @bdbch ! I think I'm going to have a blast working with flynt. I've been playing with it for a few days now, and it looks like it will dramatically change my WP workflow, for the better :) I will keep investigating the Flywheel + flynt-cli workflow over the coming weeks, after I've mastered the Flynt WP theme first on its own. I believe since the flynt-cli is using Roots Bedrock it may be more of a Bedrock + Local issue, e.g. I just read this -> https://github.com/artifex404/local-bedrock Local by Flywheel is a fairly decent tool for certain situations, and in the right environment it can save a bunch of time. Their hosting is quite snappy also! |
Warning: Use of undefined constant WP_ENV - assumed 'WP_ENV' (this will throw an Error in a future version of PHP) in /app/public/wp-content/themes/flynt-starter-theme/dist/Features/ComponentLogServer/functions.php on line 30 Warning: Use of undefined constant WP_ENV - assumed 'WP_ENV' (this will throw an Error in a future version of PHP) in /app/public/wp-content/themes/flynt-starter-theme/dist/Features/ComponentLogServer/functions.php on line 30 Warning: Use of undefined constant WP_ENV - assumed 'WP_ENV' (this will throw an Error in a future version of PHP) in /app/public/wp-content/themes/flynt-starter-theme/dist/Features/ComponentLogServer/functions.php on line 30 Warning: Use of undefined constant WP_ENV - assumed 'WP_ENV' (this will throw an Error in a future version of PHP) in /app/public/wp-content/themes/flynt-starter-theme/dist/Features/ComponentLogServer/functions.php on line 30
Obviously this message goes away if I define WP_ENV in wp-config.php e.g.
define('WP_ENV', 'development');
But I'm wondering:
Loving the theme so far, awesome work Bleech_ : )
PHP 7.2.9 | using Local by Flywheel | WP_DEBUG = true
The text was updated successfully, but these errors were encountered: