automagicwp/updater

A simple and lightweight package to update your WordPress plugins from AutomagicWP.

Installs: 20

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/automagicwp/updater

v3.0.0 2026-02-24 06:39 UTC

This package is auto-updated.

Last update: 2026-02-24 08:50:37 UTC


README

A simple and lightweight updater for WordPress plugins hosted on AutomagicWP. It hooks into WordPress's built-in update mechanism to check for new versions and display the standard update notice in the admin area.

Important

This updater requires your plugin to be hosted on AutomagicWP.com. Your plugin header must include Update URI: https://automagicwp.com.

Minimum requirements

  • PHP: 8.0 or later
  • WordPress: 6.0 or later
  • Access to your plugin's source code.
  • Optional: Composer for managing PHP dependencies

Installation

Via Composer

composer require automagicwp/updater

Manual

Copy the file in src/ into your plugin and require it:

require_once 'path/to/PluginUpdater.php';

Usage

Instantiate PluginUpdater inside your plugin. The defaults point at automagicwp.com so you only need to provide file and id for the standard setup:

<?php
/**
 * Plugin Name: My Plugin
 * Version:     1.0.0
 * Update URI:  https://automagicwp.com
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

require_once __DIR__ . '/vendor/autoload.php';

use AutomagicWP\Updater\PluginUpdater;

add_action( 'init', function () {
    new PluginUpdater( array(
        'file'   => __FILE__,
        'id'     => 'plugin_abc123',   // Plugin ID from the AutomagicWP dashboard
        'secret' => 'your-api-key',    // Optional: required for private plugins
    ) );
} );

All options

Option Required Default Description
file Yes Path to the main plugin file (__FILE__)
id Yes Plugin ID from the AutomagicWP dashboard
secret No API key for private plugins (omit for public plugins)
api_url No https://automagicwp.com/api/v1/plugin/update API endpoint
hostname No automagicwp.com Must match the Update URI header
telemetry No true Send anonymous site info (WP version, PHP version) with update checks

Replace plugin_abc123 with the Plugin ID shown in your AutomagicWP dashboard under Settings.