PHPackages                             ak86/wp-auto-post - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ak86/wp-auto-post

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ak86/wp-auto-post
=================

A simple PHP library for programatically creating Wordpress posts.

v1.0.1(4y ago)09MITPHP

Since Apr 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/amilak86/wp-auto-post)[ Packagist](https://packagist.org/packages/ak86/wp-auto-post)[ RSS](/packages/ak86-wp-auto-post/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

WP Auto Post Client
===================

[](#wp-auto-post-client)

WP Auto Post Client is a simple API client library written in PHP which allows creating new posts programatically by using Wordpress REST API, without the need to login to the dashboard.

Requirements
------------

[](#requirements)

- Nginx/Apache server configured with PHP 7.4 or higher
- Composer package manager
- Working installation of Wordpress 5.6 or later with the support for Application Passwords. Follow [this link](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/) to learn how to obtain an application password. If you can't see the application passwords section at the bottom of your wordpress user profile, you may have to enable it [manually](https://wordpress.stackexchange.com/questions/383244/application-passwords-not-working-on-localhost).

Installation
------------

[](#installation)

```
composer require ak86/wp-auto-post

```

Basic Usage
-----------

[](#basic-usage)

```
// Require composer autoloader
require_once '/path/to/vendor/autoload.php';

// Import the library
use Ak86\WPAutoPost;

// Set required config vars
$wp_post_endpoint = 'http://yourwordpresssite/wp-json/wp/v2/posts';
$wp_media_endpoint = 'http://yourwordpresssite/wp-json/wp/v2/media';
$wp_auth_username = 'your_wordpress_username';
$wp_auth_password = 'your_wordpress_application_password';

// Initialize the client instance
$wpap_client = new WPAutoPost($wp_post_endpoint, $wp_media_endpoint, $wp_auth_username, $wp_auth_password);

// creating a new post: set post image url
$imageUrl = 'http://url/to/image.jpg';

// creating a new post: upload the image
$uploaded_image = $wpap_client->upload_image($imageUrl);

// creating a new post: set post data
$postData = array(
    "title" => 'Sample Post Title',
    "content" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit ...',
    "status" => "publish"
);

// creating a new post: submit post data
$wpap_client->add_wp_post($postData, $uploaded_image->id);

```

Example App
-----------

[](#example-app)

Please checkout below repository for a functional demo project showing how to use this library.

License
-------

[](#license)

[MIT](./LICENSE)

Author
------

[](#author)

[Amila Kalansooriya](https://www.amilakalansooriya.me)

References
----------

[](#references)

-
-
-

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

1477d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4582c8c89cd45ad0e7637274649104efd7b97b2cb15b2ee1adf911b76b84ed42?d=identicon)[amilak86](/maintainers/amilak86)

---

Top Contributors

[![amilak86](https://avatars.githubusercontent.com/u/28174846?v=4)](https://github.com/amilak86 "amilak86 (8 commits)")

### Embed Badge

![Health badge](/badges/ak86-wp-auto-post/health.svg)

```
[![Health](https://phpackages.com/badges/ak86-wp-auto-post/health.svg)](https://phpackages.com/packages/ak86-wp-auto-post)
```

###  Alternatives

[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M78](/packages/google-cloud-core)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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