[wp-hackers] Is WP_INSTALLING constant here to stay?

Andrew Nacin wp at andrewnacin.com
Tue Jan 22 18:58:04 UTC 2013

On Tue, Jan 22, 2013 at 1:43 PM, Dino Termini <dino at duechiacchiere.it>wrote:

>  2) If you don't need to load WP, do you even need PHP? Is JavaScript
>> sufficient for processing your data? Just curious.
> That's quite a strong statement: "PHP without Wordpress is nothing!" :)
> From my point of view, there are still a few things that PHP can do
> directly...

That wasn't my statement.

Other than a database (which you are surely using WordPress for), what
would you be doing directly that you could not do in JavaScript?

True, but again I think that loading the whole core would be overkill for
> what I need to do in most cases (just store the data I get from Ajax into a
> table)

Wait, so you're making a database connection on your own too?

Users with weird configurations will create a 'config file' in wp-content
> which points to the right location. For what I understand, the relative
> position of /plugins/ and /wp-content/ never changes (the former always
> being inside the latter, that is). Looking for my 'config file' (and then
> searching in the usual places, if I can't find it) is quite straightforward.

First, WordPress already has a configuration file that includes the ability
to specify custom directory structures, and you get all of that for free
when you load WordPress. This is a wheel reinvention.

Second, none of this is a "weird" configuration. The following
configuration is fairly common. It has been included in draft
recommendations for shared hosts, and is the best setup for any serious

  - wp-load.php
  - plugins/

Additionally, there is no requirement that "plugins" sits inside
"wp-content", or that (as illustrated above) "wp-load.php" sits two levels
up from "plugins".

What's truly straightforward is not playing guessing games.

I am not sure if you intend to distribute this plugin. But, because it is
bad practice, we're pretty much at the point where plugins are and/or
should be rejected from the wordpress.org directory for referencing
wp-load.php or wp-config.php directly.


More information about the wp-hackers mailing list