You want to include wp-load.php
or wp-blog-header.php
not wp-settings.php
or wp-config.php
directly. If you look at the code in wp-load.php
you will see why. wp-load.php
looks for wp-config.php
in several different places, including one level above the rest of the install. If you include wp-config.php
directly the script will fail if wp-config.php
has been moved.
Now look at wp-blog-header.php
You will notice it loads wp-load.php
but also does two other things– runs wp()
and includes template-loader.php
.
Officially, it is wp-blog-header.php
that you want to load to include WordPress in a external file, but if you are aware of what is and isn’t happening you may get away with only wp-load.php
and you did ask for “bare minimum”.
You should be able to define( 'SHORTINIT', TRUE );
and limit the files that load.
If you want to get any more “minimum” you will need to start loading files piecemeal and that will become very painful very fast, not to mention be prone to error.