[wp-hackers] "deprecating" direct calls to wp-config.php

Claudio Simeone mrbrog at gmail.com
Tue Nov 3 15:43:18 UTC 2009


2009/11/2 Stephen Rider <wp-hackers at striderweb.com>:

> I just wanted to call a bit of attention to this patch:
> <http://core.trac.wordpress.org/ticket/11059>
>
> Per a recent discussion on this list, we should be discouraging plugins
> calling wp-config.php directly.

> Regards,
> Stephen

Hi Stephen,

what's the reason, in details, of discouraging direct calls of
wp-config.php (or similar of wp-load.php)?
Sometimes I include wp-load.php in scripts external to WP, so I can
use e.g., database functions etc in those scripts.
Is that correct, or is to be discouraged, and if so, what is the
correct way to use WP environment in external scripts?

thanks in advance.
Claudio


More information about the wp-hackers mailing list