SearchWP

Available since: 2.4

searchwp_basic_auth_creds

In order to get around the limitations of PHP timeouts, its indexer operates by making a series of HTTP calls to itself. Unfortunately HTTP Basic Authentication prevents this process from working, so if you are using HTTP Basic Authentication on your site, you’ll need to tell SearchWP how to log in.

Example: To tell SearchWP your HTTP Basic Authentication credentials, add the following to your theme’s functions.php:

NOTE: Use the HTTP Basic Authentication username and password NOT a WordPress login

<?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' );
view raw gistfile1.php hosted with ❤ by GitHub