The best way is to not do that. There’s no need for a plugin file to ever include the wp-config.php.
You’re doing it backwards. WordPress loads plugins. Plugins don’t load WordPress.
The best way is to not do that. There’s no need for a plugin file to ever include the wp-config.php.
You’re doing it backwards. WordPress loads plugins. Plugins don’t load WordPress.