PHPackages                             wp-api/basic-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. wp-api/basic-auth

ActiveWordpress-plugin[Authentication &amp; Authorization](/categories/authentication)

wp-api/basic-auth
=================

Basic Authentication handler for the JSON API, used for development and debugging purposes

809158.0k↓11.3%285[41 issues](https://github.com/WP-API/Basic-Auth/issues)[8 PRs](https://github.com/WP-API/Basic-Auth/pulls)PHP

Since Dec 3Pushed 4y ago30 watchersCompare

[ Source](https://github.com/WP-API/Basic-Auth)[ Packagist](https://packagist.org/packages/wp-api/basic-auth)[ RSS](/packages/wp-api-basic-auth/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Basic Authentication handler
============================

[](#basic-authentication-handler)

This plugin adds Basic Authentication to a WordPress site.

Note that this plugin requires sending your username and password with every request, and should only be used over SSL-secured connections or for local development and testing. Without SSL we strongly recommend using the [OAuth 1.0a](https://github.com/WP-API/OAuth1) authentication handler in production environments.

Installing
----------

[](#installing)

1. Download the plugin into your plugins directory
2. Enable in the WordPress admin

Using
-----

[](#using)

This plugin adds support for Basic Authentication, as specified in [RFC2617](https://tools.ietf.org/html/rfc2617). Most HTTP clients will allow you to use this authentication natively. Some examples are listed below.

### cURL

[](#curl)

```
curl --user admin:password https://example.com/wp-json/
```

### WP\_Http

[](#wp_http)

```
$args = array(
	'headers' => array(
		'Authorization' => 'Basic ' . base64_encode( $username . ':' . $password ),
	),
);
```

### [node-wpapi](http://wp-api.org/node-wpapi/)

[](#node-wpapi)

```
const WPAPI = require('./wpapi')
const wp = new WPAPI({
    endpoint: 'https://example.com/wp-json',
    username: 'editor',
    password: 'password'
});
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity57

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21655?v=4)[Ryan McCue](/maintainers/rmccue)[@rmccue](https://github.com/rmccue)

---

Top Contributors

[![rmccue](https://avatars.githubusercontent.com/u/21655?v=4)](https://github.com/rmccue "rmccue (10 commits)")[![kadamwhite](https://avatars.githubusercontent.com/u/442115?v=4)](https://github.com/kadamwhite "kadamwhite (2 commits)")[![tlovett1](https://avatars.githubusercontent.com/u/1844351?v=4)](https://github.com/tlovett1 "tlovett1 (2 commits)")[![dimadin](https://avatars.githubusercontent.com/u/2678421?v=4)](https://github.com/dimadin "dimadin (1 commits)")[![thevictorlopez](https://avatars.githubusercontent.com/u/2754872?v=4)](https://github.com/thevictorlopez "thevictorlopez (1 commits)")

### Embed Badge

![Health badge](/badges/wp-api-basic-auth/health.svg)

```
[![Health](https://phpackages.com/badges/wp-api-basic-auth/health.svg)](https://phpackages.com/packages/wp-api-basic-auth)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
