- Contributors: indieweb, snarfed, dshanske
- Tags: micropub, publish, indieweb, microformats
- Requires at least: 4.9.9
- Tested up to: 6.9
- Stable tag: 2.4.0
- Requires PHP: 7.2
- License: CC0
- License URI: http://creativecommons.org/publicdomain/zero/1.0/
Allows you to publish to your site using Micropub clients.
Micropub is an open API standard that is used to create posts on your site using third-party clients. Web apps and native apps (e.g. iPhone, Android) can use Micropub to post short notes, photos, events or other posts to your own site, similar to a Twitter client posting to Twitter.com. Requires the IndieAuth plugin for authentication.
Once you've installed and activated the plugin, try a client such as Quill to create a new post on your site. It walks you through the steps and helps you troubleshoot if you run into any problems. A list of known Micropub clients are available here.
Supports the full Micropub spec.
As this allows the creation of posts without entering the WordPress admin, it is not subject to any Gutenberg compatibility concerns per se. Posts created will not have Gutenberg blocks as they were not created with Gutenberg, but otherwise there should be no issues at this time.
Available in the WordPress plugin directory at wordpress.org/plugins/micropub.
Micropub is a W3C Recommendation that defines an open API standard for creating, updating, and deleting posts on your own website.
There are a series of troubleshooting steps in the IndieAuth plugin for this. The most common problem involves the token not being passed due the configuration of your hosting provider.
For reasons of security it is recommended that you only use this plugin on sites that implement HTTPS. Authentication is not built into this plugin. The IndieAuth plugin provides the authentication layer.
Supports Stable Extensions:
- Post Status - Either
publishedordraft - Visibility - Either
publicorprivate - Query for Category/Tag List
- Slug - Custom slug
- Query for Post List
Supports Proposed Extensions:
- Limit Parameter for Query
- Offset Parameter for Query
- Filter Parameter for Query
- Location Visibility
- Query for Supported Queries
- Query for Supported Properties
- Discovery of Media Endpoint using Link Rel
- Extended GEO URIs
- Deleting uploaded media
- Querying for media
- Filtering media by mime-type
- Return Visibility in q=config
These configuration options can be enabled by adding them to your wp-config.php:
define('MICROPUB_NAMESPACE', 'micropub/1.0')- Change the namespace for the micropub endpointdefine('MICROPUB_DISABLE_NAG', 1)- Disable notices for insecure sitesdefine('MICROPUB_DRAFT_MODE', 1)- Override default post status and set to draft for debugging
Project and support maintained on GitHub at indieweb/wordpress-micropub.
- Remove sole setting as no longer needed (see upgrade notice)
- Remove settings page as no more settings
- Bump minimum PHP version to PHP 7.2
- Require IndieAuth plugin as a dependency
- Switch to dynamic from static rendering on posts
- Stop including visible text in reply contexts since they go inside e-content
- Fix undeclared variables
- Update readme
- Fix client name bug
- Made one little mistake
- Sanitize media endpoint queries
- Add mime_type filter for media queries
- Update media endpoint query response
- Set client application taxonomy id if present
- Add display functions for showing the client or returning the client data
- Normalize JSON inputs to ensure no errors
- Add support for Visibility config return
- Sets
_edit_lastproperty when a post is updated
- Update readme links
- Add filter to allow custom database insert
- Latitude and longitude properties are now converted into a location property
- Introduce new function to simplify returning a properly set datetime with timezone
- Media Endpoint now supports a delete action
- New query unit test revealed bug in new q=source&url= query previously introduced
- Update media response to include published, updated, created, and mime_type
- Add published date to return from q=source on media endpoint
- Deduplicated endpoint test code from endpoint and media endpoint classes
- Removed error suppression revealing several notices that had been hidden
- Abstract request for scope and response into functions
- Switch check in permissions to whether a user was logged in
- Published, updated, name, and summary properties are no longer stored in post meta
- Store the timezone offset for the post in meta
- Fixed and updated testing environment
- Fixed failing tests as a result of update to testing environment
- Change return response code based on spec update from 401 to 403
- Change category query parameter from search to filter
- Fix permissions for Media Endpoint to match Endpoint
- For source query on both media and micropub endpoint support offset parameter
- Deprecate MICROPUB_LOCAL_AUTH, MICROPUB_AUTHENTICATION_ENDPOINT and MICROPUB_TOKEN_ENDPOINT constants
- Remove IndieAuth Client code, will now require the IndieAuth plugin
- Fix bug where timezone meta key was always set to website timezone
- Fix issue where title and caption were not being set for images
- Remove post scope
- Add support for draft scope
- Improve permission handling
- Fix issue with date rendering in events
- Return URL in response to creating a post
- Introduce new filters for post type and taxonomy input
- Rewrite using REST API
- Add Media Endpoint
- Improve error handling
- Ensure compliance with Micropub spec
Follow the normal instructions for installing WordPress plugins.
- Go to Plugins > Add New
- Search for "micropub"
- Click Install Now, then Activate
- Download the plugin from GitHub or WordPress.org
- Upload to
wp-content/plugins/ - Activate the plugin
before_micropub( $input )
Called before handling a Micropub request. Returns $input, possibly modified.
micropub_post_content( $post_content, $input )
Called during the handling of a Micropub request. Returns $post_content, possibly modified.
micropub_post_type( $post_type = 'post', $input )
Called during the creation of a Micropub post. Defaults to post but allows setting a custom post type.
micropub_tax_input( $tax_input, $input )
Called during the creation of a Micropub post. Allows setting custom taxonomy.
micropub_syndicate-to( $synd_urls, $user_id, $input )
Called to generate the list of syndicate-to targets.
micropub_query( $resp, $input )
Allows you to replace a query response with your own customized version.
micropub_suggest_title( $mf2 )
Allows a suggested title to be generated for the post slug.
pre_insert_micropub_post( $args )
Filters the arguments sent to wp_insert_post just prior to insertion.
after_micropub( $input, $wp_args = null )
Called after handling a Micropub request. Not called if the request fails.
micropub_syndication( $ID, $syndicate_to )
Called only if there are syndication targets for the post.
The following option and setting was removed from the plugin as the IndieAuth plugin now allows the creation of a draft token. The MICROPUB_DRAFT_MODE config override remains in place.
Static rendering for newer posts has been replaced by dynamic render.
The Micropub plugin will no longer function without the IndieAuth plugin installed.
This version changes the Micropub endpoint URL as it now uses the REST API. You may have to update any third-parties that have cached this info.