Hi everyone,
I’m looking to define environment variables (using define
or something like SetEnv WP_DB_HOST "localhost"
in PHP directives) outside of my WordPress project directory when working with LocalWP.
I want a clean setup without adding any external libraries (like Composer, dotenv, etc.) or modifying the project files directly.
Does LocalWP offer a native way to inject these constants globally or via some preload config before WordPress loads?
If so, how can I set this up?
Thanks in advance for your help!
System Details
-
Local Version: Version 9.2.4+6788
-
Operating System (OS) and OS version: MAC OS