Support » Plugin: WP Crontrol » Feature Request – Support htpasswd settings to avoid HTTP 401 error

  • Garrett Hyder

    (@garrett-eclipse)


    Hi John,

    Just a feature request to support HTPasswds so people can use your plugin on development sites that have been locked down with .htpasswd.

    Currently, if you have htpasswd enabled and go to remove cron events you’ll get this error;

    There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron events on your site may not work. The problem was:
    Unexpected HTTP response code: 401

    Screenshot – https://i.imgur.com/RHvA84r.png

    Would be nice to either have a setting or PHP filter where you can provide htpasswd credentials so the plugin can operate in that locked down environment.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    The cron spawn tester in WP Crontrol works the same way it does in WordPress core. How do cron events run on your site if the cron spawner is protected with basicauth?

    Garrett Hyder

    (@garrett-eclipse)

    Thanks John,

    With the htpasswd (basicauth) the wp-cron.php becomes inaccessible so the wp_remote_post to it which is called in test_cron_spawn/show_cron_status is unsuccessful. With SearchWP and other plugins you can provide the credentials which are used in the basicauth headers to conduct the request and spawn cron.

    Currently while in dev the core cron spawner I guess would fail due to the same issue which isn’t a huge pain as it’ll restore on goLive. I mainly wanted to use your plugin to cleanup some cron tasks from removed plugins that I don’t require anymore and want killed before going live with production.

    So yes the core cron is also affected due to the basicauth, was just hoping for a filter I could hook into so as to provide basic auth to the requests.

    I can understand if that’s not something you think is useful within your plugin, so for now will just disable basicauth temporarily to do my tasks and then reenable afterwards.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature Request – Support htpasswd settings to avoid HTTP 401 error’ is closed to new replies.