n3xt0r/wp-xpub

Flexible Multi-Channel Auto Publisher for WordPress

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:wordpress-plugin


README

CI Latest Stable Version Code Coverage Maintainability

Flexible Multi-Channel Auto Publisher for WordPress Publish your blog posts to Dev.to or any custom target – automatically and without writing a single line of code.

✨ What is WP-XPub?

WP-XPub is a lightweight, ready-to-use WordPress plugin that lets you automatically share your posts to multiple external platforms – either instantly or via scheduled jobs.

No technical knowledge needed – just install, activate, connect your accounts and you're done.
🛠️ Developers welcome – WP-XPub is modular, PSR-compliant, and follows a clean hexagonal architecture.

🚀 Features

  • 🔁 Auto-publish WordPress posts to external platforms
  • 🔌 Built-in Dev.to, Mastodon and linkedIn driver – extendable via plugin drivers
  • 🧩 Modular client driver system (easily extend to new platforms)
  • ⏱️ Publish immediately or schedule for later
  • 🧵 Custom pre- and post-publish hooks
  • 📦 Composer-ready (PSR-4 autoloading, modern structure)
  • ⚛️ React-based admin interface bundled with Vite for fast builds
  • 🐘 Local logging via Monolog – no external tracking or APIs
  • 🔄 GitHub update integration with custom updater hooks

📦 Installation

  1. Clone or download the plugin into your wp-content/plugins directory.
  2. Activate it via the WordPress admin panel.
  3. Go to Settings > XPUB and connect your desired platforms.

or

composer require n3xt0r/wp-xpub

If you're using Bedrock or similar Composer-managed WP setups, you're ready to go.

📄 See the full installation guide for details.

⚠️ Note: WP-XPub is not listed on the official WordPress Plugin Directory.
This is by design: WordPress.org enforces legacy coding patterns that conflict with modern PSR standards and clean architecture.
WP-XPub prioritizes maintainability and extensibility over legacy compatibility.

🛠️ Why this deviation?
WP-XPub follows a hexagonal (ports & adapters) architecture to enforce separation of concerns, testability, and long-term maintainability.
The WordPress Plugin Directory imposes structural constraints that prevent clean software design, including:

  • Reliance on functions.php and global functions instead of DI and modular bootstrapping
  • Static hook registration without lifecycle encapsulation
  • No support for PSR-4, namespaces, or autoloading
  • A legacy translation system (gettext) that requires literal strings for all translatable text – making dynamic or domain-driven I18n impossible
  • No support for application-layer abstractions (e.g. service containers, middleware, or event buses)

❌ These constraints hinder composability, reusability, and testability.

✅ WP-XPub deliberately separates domain logic, infrastructure, and framework adapters – allowing modern PHP practices like:

  • Constructor-based dependency injection
  • PSR-compliant, autoloaded class structure
  • Dynamic, context-aware translations via service-based I18n
  • Full test coverage of application and domain code – independent from WordPress internals

WP-XPub is designed for developers who want to integrate WordPress without being constrained by it.

✅ Requirements

  • PHP 8.2+
  • WordPress 6.0+ (tested with 6.8.2)
  • Composer (optional, for development or extensions)

🧠 For Developers

WP-XPub is built with a clear separation of concerns and is easy to extend:

  • 🧱 Hexagonal architecture (Ports & Adapters)
  • 🧩 Create your own publisher drivers with minimal boilerplate
  • 📦 Fully PSR-4 compliant, Composer-ready
  • 🧪 CI integration and code coverage metrics
  • 🐘 Monolog-based logging system
  • 🔄 GitHub update workflow with changelog diffing

See the developer docs for more:

📚 Full Documentation

All documentation is available in the docs/ folder:

📃 License

MIT License

💬 Credits

Made with ❤️ by @N3XT0R – Contributions welcome!