Cloning on a Password Protected Site

If you have HTTP basic auth enabled for your site (where your browser prompts you for a username and password to access it), the Cloner won’t be able to successfully run its background processes out of the box. You’ll need add the following code to a new file in your plugins directory (the filename doesn’t matter), and then enable the NS Cloner Basic Auth plugin that it will create:

<?php /**  * Plugin Name: NS Cloner Basic Auth  * Description: Enable the NS Cloner to work for an HTTP basic auth protected site.  * Author: Never Settle  */  $username = 'YOUR USERNAME'; $password = 'YOUR PASSWORD';  add_filter(    'http_request_args',    function( $request ) {       $request['headers']['Authorization'] = 'Basic ' . base64_encode( "$username:$password" );       return $request;    } );

Still need help? Contact Us Contact Us