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.
Install the IndieAuth plugin from the WordPress plugin directory, then install this plugin. No setup needed.
2.4.0 (2024-06-13)
- Remove sole setting as no longer needed(see upgrade notice)
- Remove settings page as no more settings.
- Bump minimum PHP version to PHP7.2
- Require IndieAuth plugin as a dependency
- Switch to dynamic from static rendering on posts...markup will no longer be placed inside the content block but dynamically added.
2.3.3 (2023-03-10)
- Stop including visible text in reply contexts since they go inside since they go inside e-content, which webmention recipients use as the reply text.
- Fix undeclared variables
2.3.2 (2022-06-22 )
- Update readme
- Fix client name bug
2.3.1 (2021-12-25 )
2.3.0 (2021-12-25 )
- 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 which will work with or without the client application taxonomy added in Indieauth
- Normalize JSON inputs to ensure no errors
- Add support for Visibility config return https://github.com/indieweb/micropub-extensions/issues/8#issuecomment-536301952
- Sets
_edit_last
property when a post is updated.
2.2.5 (2021-09-22 )
- 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 now just include published, updated, created, and mime_type for now.
2.2.4 (2021-05-06 )
- Add published date to return from q=source on media endpoint
2.2.3 (2020-09-09 )
- Deduplicated endpoint test code from endpoint and media endpoint classes.
- Removed error suppression revealing several notices that had been hidden. Fixed warning notices.
- Abstract request for scope and response into functions to avoid calling the actual filter as this may be deprecated in future.
- Switch check in permissions to whether a user was logged in.
- Published, updated, name, and summary properties are no longer stored in post meta. When queried, they will be pulled from the equivalent WordPress properties. Content should be as well, however as content in the post includes rendered microformats we need to store the pure version. Might address this in a future version.
- As timezone is not stored in the WordPress timestamp, store the timezone offset for the post in meta instead.
- Sideload and set featured images if featured property is set.
2.2.2 (2020-08-23 )
- 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
2.2.1 (2020-07-31 )
- Change category query parameter from search to filter per decision at Micropub Popup Session
- Fix permissions for Media Endpoint to match Endpoint
- For source query on both media and micropub endpoint support offset parameter
2.2.0 (2020-07-25 )
- Deprecate MICROPUB_LOCAL_AUTH, MICROPUB_AUTHENTICATION_ENDPOINT and MICROPUB_TOKEN_ENDPOINT constants.
- Remove IndieAuth Client code, will now require the IndieAuth or other plugin that does not yet exist.
2.1.0 (2020-02-06 )
- Fix bug where timezone meta key was always set to website timezone instead of provided one
- Fix issue where title and caption were not being set for images by adopting code from WordPress core
- Remove post scope
- Add support for draft scope
- Improve permission handling by ensuring someone cannot edit another users posts unless they have that capability
- Fix issue with date rendering in events
- return URL in response to creating a post
- introduce two new filters to filter the post type and the taxonomy input for posts
2.0.11 (2019-05-25)
- Fix issues with empty variables
- Update last media query to limit itself to last hour
- Undelete is now part of delete scope as there is no undelete scope
- Address issue where properties in upload are single property arrays
2.0.10 (2019-04-13)
- Fix issue with media not being attached to post
2.0.9 (2019-03-25)
- Add filter
micropub_suggest_title
and related function to generate slugs
- Map updated property to WordPress modified property
- Add meta key to micropub uploaded media so it can be queried
- Add last and source queries for media endpoint
- Set up return function for media that returns attachment metadata for now
2.0.8 (2019-03-08)
- Parse geo URI into h-geo or h-card object
2.0.7 (2019-02-18)
- Update geo storage to fix accuracy storage as well as allow for name parameter and future parameters to be passed. Indigenous for Android now supports passing this
2.0.6 (2018-12-30)
- Adjust query filter to allow for new properties to be added by query
- Add Gutenberg information into README
2.0.5 (2018-11-23)
- Move syndication trigger to after micropub hook in order to ensure final version is rendered before sending syndication
- Add settings UI for alternate authorization endpoint and token endpoint which will be hidden if Indieauth plugin is enabled
2.0.4 (2018-11-17)
- Issues raised on prior release.
- Removed generating debug messages when the data is empty
2.0.3 (2018-11-17)
- Fix issue where the after_micropub action could not see form encoded files by adding them as properties on upload
- Fix issue in previous release where did not account for a null request sent by wpcli
- Add search parameter to category
- Wrap category query in categories key to be consistent with other query parameters
- If a URL is not provided to the query source parameter it will return the last 10 posts or more/less with an optional parameter
- Micropub query filter now called after default parameters are added rather than before so it can modify the defaults rather than replacing them.
- Micropub config query now returns a list of supported mp parameters and supported q query parameters
- Micropub media endpoint config query now returns an empty array indicating that it has no configuration parameters yet
2.0.2 (2018-11-12)
2.0.1 (2018-11-04)
- Move authorization code later in load to resolve conflict
2.0.0 (2018-10-22)
- Split plugin into files by functionality
- Change authorization to integrate with WordPress mechanisms for login
- Reject where the URL cannot be matched with a user account
- Rewrite using REST API
- Use
indieauth_scopes
and indieauth_response
originally added for IndieAuth integration to be used by built in auth as well
- Improve handling of access tokens in headers to cover additional cases
- Add Media Endpoint
- Improve error handling
- Ensure compliance with Micropub spec
- Update composer dependencies and include PHPUnit as a development dependency
- Add nag notice for http domains and the option to diable with a setting
- Load auth later in init sequence to avoid conflict
1.4.3 (2018-05-27)
- Change scopes to filter
- Get token response when IndieAuth plugin is installed
1.4.2 (2018-04-19)
1.4.1 (2018-04-15)
- Version bump due some individuals not getting template file
1.4 (2018-04-08)
- Separate functions that generate headers into micropub and IndieAuth
- Add support for an option now used by the IndieAuth plugin to set alternate token and authorization endpoints
- MICROPUB_LOCAL_AUTH configuration option adjusted to reflect that this disables the plugin built in authentication. This can hand it back to WordPress or allow another plugin to take over
- MICROPUB_LOCAL_AUTH now disables adding auth headers to the page.
- Fix post status issue by checking for valid defaults
- Add configuration option under writing settings to set default post status
- Add
micropub_syndication
hook that only fires on a request to syndicate to make it easier for third-party plugins to hook in
1.3 (2017-12-31)
- Saves access token response in a post meta field
micropub_auth_response
.
- Bug fix for
post_date_gmt
- Store timezone from published in arguments passed to micropub filter
- Correctly handle published times that are in a different timezone than the site.
- Set minimum version to PHP 5.3
- Adhere to WordPress Coding Standards
- Add
micropub_query
filter
- Support Nested Properties in Content Generation
- Deprecate
MICROPUB_DRAFT_MODE
configuration option in favor of setting option
- Remove post content generation override in case of microformats2 capable theme or Post Kinds plugin installed
- Introduce
micropub_post_content
filter to which post content generation is attached so that a theme or plugin can modify/remove the post generation as needed
1.2 (2017-06-25)
1.1 (2017-03-30)
- Support
h-adr
, h-geo
, and plain text values for p-location
.
- Bug fix for create/update with
content[html]
.
1.0.1
- Remove accidental dependence on PHP 5.3 (#46).
1.0
Substantial update. Supports
full W3C Micropub spec, except for optional
media endpoint.
- Change
mf2_*
post meta format from multiple separate values to single array value that can be deserialized with unserialize
.
- Change the
before_micropub
filter's signature from ( $wp_args )
to ( $input )
(microformats2 associative array).
- Change the
after_micropub
hook's signature changed from ( $post_id )
to ( $input, $wp_args )
(microformats2 associative array, WordPress post args).
- Post content will not be automatically marked up if theme supports microformats2 or Post Kinds plugin is enabled.
- Add PHP Codesniffer File.
0.4
- Store all properties in post meta except those in a blacklist.
- Support setting authentication and token endpoint in wp-config by setting
MICROPUB_AUTHENTICATION_ENDPOINT
and MICROPUB_TOKEN_ENDPOINT
.
- Support setting all micropub posts to draft in wp-config for testing by setting
MICROPUB_DRAFT_MODE
in wp-config.
- Support using local auth to authenticate as opposed to IndieAuth as by setting
MICROPUB_LOCAL_AUTH
in wp-config.
- Set content to summary if no content provided.
- Support querying for syndicate-to and future query options.
0.3
- Use the specific WordPress user whose URL matches the access token, if possible.
- Set
post_date_gmt
as well as post_date
.
0.2
- Support more Micropub properties:
photo
, like-of
, repost-of
, in-reply-to
, rsvp
, location
, category
, h=event
.
- Check but don't require access tokens on localhost.
- Better error handling.
0.1
Initial release.