Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/25f9a5a7f26b06bf4ab5 to your computer and use it in GitHub Desktop.
Save jchristopher/25f9a5a7f26b06bf4ab5 to your computer and use it in GitHub Desktop.
Provide SearchWP the necessary HTTP Basic Authentication credentials for the indexer to work in that environment
<?php
function my_searchwp_basic_auth_creds() {
// NOTE: this needs to be your HTTP BASIC AUTH login
//
// *** NOT *** your WordPress login
//
//
$credentials = array(
'username' => 'my_username', // the HTTP BASIC AUTH username
'password' => 'my_password' // the HTTP BASIC AUTH password
);
return $credentials;
}
add_filter( 'searchwp_basic_auth_creds', 'my_searchwp_basic_auth_creds' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment