Autopost for X (formerly Autoshare for Twitter)
Autopost for X (formerly Autoshare for Twitter)
Description
Autopost for X (formerly Autoshare for Twitter) automatically shares your posts to X/Twitter as soon as they’re published. Once you hit the Publish button, the plugin sends your post’s title, featured image, and link to X/Twitter, along with a custom message.
Unlike a myriad of other social media, multitool solutions, Autopost for X is built solely for X/Twitter. It focuses on doing one thing and does it well, with the code and interface craftsmanship we apply to every project.
With Autopost for X, developers can further customize nearly everything about the posts, including the image, author, and link, using an extensive set of hooks built into the code. Among its other features, the WordPress plugin:
- Works in both the classic and new block editors.
- Becomes part of the pre-publish checklist step that’s part of the new block editor.
- Posts a high-quality featured image with your post to X/Twitter.
- Counts characters to keep you under the X/Twitter limit.
- Adds a link to the post to X/Twitter in the block editor sidebar.
Disclaimer: TWITTER, TWEET, RETWEET and the Twitter logo are trademarks of Twitter, Inc. or its affiliates.
Plugin Compatibility
Distributor
When using with 10up’s Distributor plugin, posts that are distributed will not be autoposted if they are already posted to X/Twitter from the origin site. Autopost for X tracks posts that have been posted to X/Twitter in post meta to avoid “double posting”. To avoid this behavior, use the dt_blacklisted_meta filter to exclude the ‘autoshare_for_twitter_status’ meta value from being distributed :
add_filter( 'dt_blacklisted_meta', function( $blacklisted_metas ) {
$blacklisted_metas[] = 'autoshare_for_twitter_status';
return $blacklisted_metas;
} )
Developers
Note: Posts and pages are supported by default. Developers can use the autoshare_for_twitter_default_post_types filter to change the default supported post types
Custom post types can now be opted into autopost features like so:
function opt_my_cpt_into_autoshare() {
add_post_type_support( 'my-cpt', 'autoshare-for-twitter' );
}
add_action( 'init', 'opt_my_cpt_into_autoshare' );
In addition, adding support while registering custom post types also works. Post types are automatically set to autopost. Future versions of this plugin could allow this to be set manually.
While the autopost feature can be opted into for post types using the above filter, by default the editor still has to manually enable autopost during the post prepublish flow. The autoshare_for_twitter_enabled_default filter allows autopost to be enabled by default for all posts of a given post type. Editors can still manually uncheck the option during the publishing flow.
Example:
function enable_autoshare_by_default_for_core_post_type( $enabled, $post_type ) {
if ( 'post' === $post_type ) {
return true;
}
return $enabled;
}
add_filter( 'autoshare_for_twitter_enabled_default', 'enable_autoshare_by_default_for_core_post_type', 10, 2 );
Additional technical details can be found in our GitHub repository.
Installation
- Install the plugin via the plugin installer, either by searching for it or uploading a .ZIP file.
- Activate the plugin.
- Save X/Twitter connection settings, found under
Settings>Autopost for X.
Screenshots
Faq
Yes, yes it does! For more details on this, see #44.
Yes, the plugin is compatible with X/Twitter API v2.
There are a few potential reasons for this error:
1. Incorrect X/Twitter API credentials: Please ensure that you have entered the correct X/Twitter API credentials.
2. Deprecated access levels: If you are still using the old X/Twitter access levels (Standard (v1.1), Essential (v2), Elevated (v2), etc…), you must migrate to the new access levels (Free, Basic, Pro, etc.). Please make sure to migrate to the new access levels to ensure uninterrupted functionality. Here’s how you can do it:
1. Go to the following URL: https://developer.twitter.com/en/portal/products
2. Look for the "Downgrade" button.
3. Click on it to migrate to the free access level.
If you’re seeing the error message “429: Too Many Requests” it indicates that you have exceeded the usage limits of X/Twitter’s Free API access. With the Free API, you are allowed 500 requests per month and 17 requests within a 24-hour period. Please note that these limits were accurate at the time of writing and may have been updated. For the most up-to-date information, please refer to the X API documentation. Since you have surpassed the daily limit, we kindly advise waiting for 24 hours before attempting to post again.
To avoid encountering this error in the future and to have higher usage limits, we recommend considering a subscription to either the Basic or Pro access level. These access levels provide increased quotas and additional benefits to accommodate your needs. For more information on X/Twitter API access levels, you can visit this link: https://developer.x.com/en/products/x-api.
Reviews
Professional
By yeknafar on July 7, 2025
I really liked it. I hoped it had a help video file for start too.
Thanks
It works and has nice documentation
By justinwyllie on November 16, 2024
The documentation on how to connect it to a free developer account is very clear and accurate. Very welcome to see such nice documentation.
Works great with 2.0
By mattwillms on June 14, 2023
This plugin is working with the new Twitter API changes. What a lifesaver!
The best twitter plugin in 2023
By alhalkab on June 12, 2023
Excellent! Thanks
Works perfect!
By ibiza69 on June 1, 2023
This plugin works incredibly well, including new Twiiter v2 API.
Support its really quick, professional, polite, kind and patient.
It has being a joy to meet this developer.
Thank you!!
Love it! Works perfectly
By Kori Ashton (Webtegrity) on April 26, 2020
Changelog
2.3.1 – 2025-07-14
Note that this version bumps the WordPress minimum supported version from 6.5 to 6.6.
- Changed: Bump WordPress “tested up to” version 6.8 (props @Sourabh208, @iamdharmesh, @jeffpaul via #367, #370).
- Changed: Bump WordPress minimum supported version to 6.6 (props @peterwilsoncc, @Sourabh208, @jeffpaul via #359, #367, #370).
- Changed: Make the API rate limit wording more clear (props @jeckman, @iamdharmesh, @dkotter via #365).
- Fixed: Ensure that no rate limits are shown if the reset time has passed (props @iamdharmesh, @dkotter via #356).
- Security: Bump
@wordpress/scriptsfrom 27.9.0 to 30.10.0 (props @dependabot, @peterwilsoncc via #359). - Security: Bump
cookiefrom 0.6.0 to 0.7.1,expressfrom 4.21.0 to 4.21.2,serialize-javascriptfrom 6.0.0 to 6.0.2 andmochafrom 10.2.0 to 11.1.0 (props @dependabot, @iamdharmesh via #361). - Security: Bump
http-proxy-middlewarefrom 2.0.6 to 2.0.9 (props @dependabot, @iamdharmesh via #369). - Security: Bump
tar-fsfrom 3.0.8 to 3.0.9 (props @dependabot, @dkotter via #373).
2.3.0 – 2025-02-05
Note that this version bumps the WordPress minimum supported version from 5.7 to 6.5.
- Added: Expose the X headers to the
autoshare_for_twitter_after_status_updatehook (props @s3rgiosan, @iamdharmesh via #353). - Added: Admin dashboard widget for easy access to API usage statistics (props @s3rgiosan, @iamdharmesh via #354).
- Changed: Display API usage statistics in the “Autopost to X/Twitter” block editor panel (props @s3rgiosan, @iamdharmesh via #354).
- Changed: Bump WordPress “tested up to” version 6.7 (props @sudip-md, @dkotter, @thrijith, @jeffpaul, @iamdharmesh via #335, #347, #348).
- Changed: Bump WordPress minimum from 5.7 to 6.5 (props @thrijith, @jeffpaul, @iamdharmesh via #347, #348).
- Security: Bump
bracesfrom 3.0.2 to 3.0.3,pac-resolverfrom 7.0.0 to 7.0.1,socksfrom 2.7.1 to 2.8.3,wsfrom 7.5.9 to 7.5.10 and removesip(props @dependabot, @iamdharmesh via #327). - Security: Bump
axiosfrom 1.6.7 to 1.7.4 (props @dependabot, @faisal-alvi, @dkotter via #336, #337). - Security: Bump
webpackfrom 5.90.0 to 5.94.0 (props @dependabot, @iamdharmesh via #339). - Security: Bump
wsfrom 7.5.10 to 8.18.0,serve-staticfrom 1.15.0 to 1.16.2 andexpressfrom 4.19.2 to 4.21.0 (props @dependabot, @Sidsector9 via #343).
2.2.1 – 2024-07-08
- Changed: Bump WordPress “tested up to” version 6.5 (props @iamdharmesh, @dkotter, @sudip-md, @jeffpaul via #319).
- Fixed: Ampersands no longer converted to HTML entities when adding query parameters to the post URL with the
autoshare_for_twitter_post_urlfilter (props @justinmaurerdotdev, @iamdharmesh via #324). - Security: Bump
expressfrom 4.18.2 to 4.19.2 (props @dependabot, @iamdharmesh via #321). - Security: Bump
follow-redirectsfrom 1.15.5 to 1.15.6 (props @dependabot, @iamdharmesh via #321). - Security: Bump
ipfrom 1.1.8 to 1.1.9 (props @dependabot, @iamdharmesh via #321). - Security: Bump
webpack-dev-middlewarefrom 5.3.3 to 5.3.4 (props @dependabot, @iamdharmesh via #321).
Further changelog entries can be found in the CHANGELOG.md file.



