WP to Twitter


Post Tweets from WordPress to Twitter.

Yep. That’s the basic functionality. But it’s not the only thing you can do:

  • Display your Recent Tweets: Widget for your recent Tweets. Fetch Tweets from your own or any other account.
  • Display Tweets based on a search: Display the Tweets resulting from a search and limit by Geolocation.
  • Shorten URLs in your Tweets with popular URL shorteners, or let Twitter to do it with t.co.

Upgrade to WP Tweets Pro and schedule Tweets, set up automatic reposts, upload images and more!

WP to Twitter uses a customizable Tweet template for Tweets sent when updating or editing posts and pages or custom post types. You can customize your Tweet for each post, using custom template tags to generate the Tweet.

Free Features

  • Use post tags as Twitter hashtags
  • Use alternate URLs in place of post permalinks
  • Support for Google Analytics
  • Support for XMLRPC remote clients
  • Select from YOURLS, Goo.gl, Bit.ly, jotURL, or Su.pr as external URL shorteners.
  • Rate limiting: make sure you don’t exceed Twitter’s API rate limits.

Premium Features

Upgrade to WP Tweets Pro for extra features, including:

  • Authors can set up their own Twitter accounts in their profiles
  • Time delayed Tweeting
  • Scheduled Tweet management
  • Simultaneously Tweet to site and author Twitter accounts
  • Preview and Tweet comments
  • Filter Tweets by taxonomy (categories, tags, or custom taxonomies)
  • Upload images to Twitter with alt attributes
  • Integrated Twitter Card support
  • Support for Player Cards with integrated captions
  • Automatically schedule Tweets of old posts
  • Get a license for WP Tweets PRO!

Want to stay up to date on WP to Twitter? Follow me on Twitter!


Visit the WP to Twitter translation site to see how complete the current translations are.

Translating my plug-ins is always appreciated. Work on WP to Twitter translations at the WordPress translation site! You’ll need a WordPress.org account to contribute!

Extending WP to Twitter

Check out my GitHub repository of plug-in extensions.


  • WP to Twitter Set up.
  • WP to Twitter Post Meta box.
  • WP to Twitter post meta box with WP Tweets PRO active.
  • WP Tweets PRO settings.
  • Example Twitter Feed (Twenty Nineteen)
  • Basic WP to Twitter Settings


  1. Upload the wp-to-twitter folder to your /wp-content/plugins/ directory
  2. Activate the plugin using the Plugins menu in WordPress
  3. Go to Settings > WP to Twitter
  4. Adjust the WP to Twitter Options as you prefer them.
  5. Create a Twitter application at Twitter and Configure your OAuth keys


Where are your Frequently Asked Questions? Why aren’t they here?

Right here: WP to Twitter FAQ. I don’t maintain them here because I would prefer to only maintain one copy. This is better for everybody, since the responses are much more likely to be up to date!

Twitter’s Application creation process is very difficult. Why do I have to do this?

WP to Twitter has always followed the principle that you are the owner of your own application. Many other applications require you to pass your data through a 3rd party that you authenticate to post to Twitter. Twitter has gradually made the process to create a new application more and more difficult. There is nothing I can do about that.

How can I help you make WP to Twitter a better plug-in?

Writing and maintaining a plug-in is a lot of work. You can help me by providing detailed support requests (which saves me time), or by providing financial support, either via my plug-in donations page or by upgrading to WP Tweets Pro. Believe me, your support really makes a difference!


September 12, 2020
I installed this plugin (free version) as a trial and was happy with the results until I started using Broken Link Checker to resolve dead links on the site. Every time I corrected a link it Tweeted. I must make it absolutely clear here this was NOT the fault of WP to Twitter. Obviously at the time I did not know that so I contacted Joe for support. He graciously assisted me despite that fact that it was not a paid version and I had not at that time donated. I have to say we were both scratching our heads. Joe could find nothing wrong and I had an error. Eventually Joe surmised that by unchecking the 'Disable post modified date change when link is edited' checkbox in Broken Link Checker it might cure the problem, his reasoning being 'I'm thinking it could be that since the post modified date isn't being changed, it's using the same post modified date on the post that was already in place. If that post modified date is within 10 seconds of the publication date, then that will result in the post being treated as a new post.' I unchecked the box and no more erroneous Tweets. Joe put much head-scratching into this as he could not reproduce that error at his end so I thank him for his time, effort and frustration and congratulate him on coming up with the solution to a problem that was not, ultimately, of his making. Absolutely brilliant support and the plugin does exactly what it says on the tin!
Junie 26, 2020
The plugin works as described. What I really like is the ability to define different templates for the individual post-types. That's a core functionality I need. I miss the auto-tweet. I understodd it should do it, but it doesn't. So you have to manually copy the tweet template into the tweet field and tweet it by clicking a button after publishing the post. This is a workaround I can live with but auto tweeting as promised would of course be good and earn the plugin the fifth star.
Februarie 10, 2020
Used to work great. Does not work properly with Gutenberg editor though. i.e. tags no longer get tweeted - which was why I used this plugin. Since Gutenberg editor became default for WordPress this makes the plugin unusable. It now can only do a basic tweet with title and link - like many other plugins already do. Hesitant to try Pro if the Basic features are broken.
Augustus 21, 2019
I've tried using WP to Twitter on multiple sites, following all the instructions and the auto-Tweet for new posts just doesn't work. I have to manually Tweet every post, which is really not ideal with multiple authors. Looking for a different app to use now.
Read all 61 reviews

Contributors & Developers

“WP to Twitter” is oopbron sagteware. Die volgende mense het bygedra tot die ontwikkeling van hierdie uitbreiding:


“WP to Twitter” has been translated into 7 locales. Thank you to the translators for their contributions.

Translate “WP to Twitter” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Bug fix: Query to Twitter config endpoint should never run more than once a day.


  • Bug fix: missing CSS for headings.
  • Bug fix: Add option to allow autoposting to work. Option will break manual posting, however.


  • Bug fix: Run metadate save on wp_after_insert_post, as well, when it exists.
  • Bug fix: Incorrect value passed to wp_localize_script.
  • Move PHP tests from Travis-CI to GitHub Actions.
  • Fix results of PHP testing.
  • Minor clean-up in debugging.
  • Update screenshots for repository.
  • Changed WP requirement to >= 4.9.8
  • Bug fix: Post meta saving after post published in block editor


  • Update connection instructions to match Project & App structure at Twitter.
  • Update metabox design and layout.
  • Toggle default length based on current locale.
  • Remove stored URLs; no longer important to avoid repeat shortener queries.
  • Mask app tokens after saving.
  • Automatically switch to staging mode if environment query returns staging.
  • Bug fix: remove whitespace in some settings inputs
  • New: use wp_after_insert_post action (new in WP 5.6) so terms & metadata are saved at the time posts are published when using the block editor.
  • Numerous updates for WP Tweets Pro users.


  • Feature: ability to add mentions in tags to be parsed with @ instead of #.
  • Feature: Add support for Hum URL shortener
  • Improve install process for 3rd-party plugin URL shorteners.
  • Use Full post modified & publish dates in debugging info. (Including seconds.)


  • Clear a couple PHP notices.
  • Add styles for Pro.


  • Bug fix: Incorrect variable type in default tab assignment.
  • Bug fix: Two incorrectly named array keys in debugging.
  • Bug fix: Shortened URLs shouldn’t be called if using WP permalinks.


  • Bug fix: Changed rules for differentiating between new and edited posts.
  • Bug fix: Bit.ly supporting plug-in changed function name.
  • Bug fix: Variable types different between default settings & saved settings.
  • Bug fix: Prevent scheduled Tweets (Pro) if post has been deleted.
  • Update debugging messages & data for better clarity.


  • Bug fix: YOURLS queries not executing.


  • Add support for @ references on tags.
  • Add support for Codehaveli Bitly URL Shortener
  • Remove deprecated category filters. (UI disabled in 2014.)
  • Don’t query shorteners if they are enabled but settings are missing.


  • Bug fix: Due to external add-ons, need to test URL shortener settings as strings, not integers.
  • Bugfix: If YOURLS JSON object does not exist, it cannot have values.
  • Change: Support custom domains in jotURL.
  • Change: Add user info to debugging records.


  • Bug fix: Failed to account for a URL value that could be false in template parsing.


  • Bug fix: don’t parse Username settings if user is connected to Twitter (Pro)
  • Bug fix: Non-semantic text in user settings.
  • Bug fix: type error in media comparison.
  • Improve logic for exiting media handling. (Pro)


  • Removed goo.gl shortener completely (disabled by Goo.gl in March 2019)
  • Removed su.pr shortener completely (Stumbleupon closed down in June 2018)
  • Prep for removal of Bit.ly URL shortener. (Bitly API v3 will shut down March 2020)
  • Misc. markup improvements.


  • New function: wpt_allowed_post_types(). Returns array of post types that can be Tweeted.
  • New template tag: #categories# Return string of all categories on post. Filterable with ‘wpt_twitter_category_names’
  • Change: default tag length allowed raised to 20
  • Change: default number of tags allowed raised to 4
  • Breaking change: Remove major function deprecated in January 2017 and minor functions deprecated March 2018.


  • Missed ssl_verify=false removed


  • Pass post ID to wpt_retweet_text filter.
  • Don’t throw duplicate Tweet error if Tweet is blank.


  • Change: Display UI for post types that are private but have a UI (e.g., WooCommerce coupons)
  • Bug fix: User permissions for connecting to Oauth overrode ability to enter personal settings.
  • Bug fix: Exit meta migration if post does not exist.


  • Added filter to cancel Tweets for custom reasons after all other filters executed.
  • Removed video on app creation, due to Twitter’s radical revision of creation process.
  • Update setup instructions inside app.


  • Change function name for checking edit vs. new for clarity.
  • Update debugging function to pass post ID of current Tweet.
  • Bug fix: PHP Notice in settings.
  • Bug fix: If rate limiting cron not set, automatically recreate.


  • Change: Remove replacement character setting unless in use for non-space character
  • Change: Capitalize each word in tags sent to Twitter (accessibility)


  • Bug fix: Check for existing short URL should not run when parsing text of Tweets for URLs.


  • Bug fix: Assignment replaced with comparison in connection creation.


  • Bug fix: fallback normalizer method called incorrectly


  • Removed: upgrade paths from version 2.4.x
  • Removed: support for YOURLS version 1.3
  • Removed: support for Twitter Friendly Links (plug-in not updated in 8 years)
  • Removed: Ability to enable the Goo.gl URL shortener (see: https://developers.google.com/url-shortener/)
  • Removed: fallback functions required for PHP 4 support.
  • Add ‘show images’ as option in feeds.
  • Support for alt attributes displayed in Feeds
  • Improved URL generation to link to searched Tweets.
  • Improve parsing of URLs in Tweets.
  • Don’t save URLs if no shortener used or shortener returns no value.
  • Option to ignore stored URLs when sending Tweets.
  • Code now conforms with WordPress PHP standards with the exception of four deprecated functions.


  • If short URL already stored, do not execute shortening routine
  • Remove instances of create_function for PHP 7.2 compat
  • Remove language files completely in favor of WordPress.org translations
  • CSS fix
  • Minor text changes


  • Add temporary method to extend character count. Twitter has not yet released their new character counting library.
  • Minor style changes


  • Bug fix: Fix arguments when using keywords with YOURLS
  • Bug fix: Problem saving settings in PHP 7.1 due to array assignment changes
  • New: Add filter to provide custom support any taxonomy as hashtags, ‘wpt_hash_source’ & ‘wpt_hash_tag_sources’
  • New: Add cache refresh checkbox for Tweet widget
  • Update: Rewritten debugging mechanism
  • New: admin notice to indicate in debugging.
  • Remove Freemius (with all thanks to the Freemius team.)
  • Minor tweaks to Tweet widget CSS


  • Bug fix: account for mixed return values in get_the_tags()


  • Bug fix: Only save last Tweet if sent successfully (See https://wordpress.org/support/topic/character-count-not-updating-and-subsequent-tweets-not-going-through/#post-9338623)
  • Bug fix: in truncation settings, match displayed tag names to tags used in templates.
  • Text fixes: clarify YOURLS settings notices & fields
  • Add option: Hash tags from categories instead of tags
  • Bug fix: incorrect url


  • Function name change in primary function.
  • Early exit in wpt-feed
  • Fix icon in metabox headings
  • Misc. minor design tweaks


  • Bug fix: missing check to verify array caused AJAX error


  • Bug fix: “Tweet Now” button threw error if selecting main site account [Pro]
  • New action executed when posting to Twitter
  • New debugging point in media retrieval


  • Bug fix: activation status of licenses in WP Tweets Pro misreported in support data
  • Removed longurl.org expander since the service has been shut down.
  • Exclude uploaded media URLs from character counting (WP Tweets Pro)
  • Feature: Support adding custom templates for specific taxonomy terms (WP Tweets Pro)


  • Bug fix: help/config should not be queried if user has not yet authenticated.


  • Bug fix: call help/config to check t.co URL lengths and make sure length used is current value
  • Parse URLs in text and send to URL shortener before Tweeting.
  • Test for WordPress 4.6


  • Two new filters in post meta box
  • Add option to set your own Goo.gl API key for improved shortener reliability
  • Removed my fallback functions for mb_substr and mb_strlen & support for WordPress 4.1
  • Fixed a broken URL
  • Updated sales copy


  • Bug fix: extra closing p tag in widget output.
  • Feature: pattern for getting arbitrary author meta: {{meta_field}}
  • Minor security fix: ignored wpnonce verification if nonce not provided in settings admin.


  • Bug fix: extra is_admin call in Freemius implementation
  • Feature: ‘Tweet Now’ & dynamic scheduling recognizes currently selected users & upload media status (Pro)


  • Bug fix: Stray debugging email in curl processing.


  • Feature: prevent Duplicate Posts plug-in from copying WP to Twitter meta data
  • Feature: add curl fallback in case WP_http doesn’t function correctly.
  • Feature: support for image alt attributes in widget
  • Feature: support for selective refresh in customizer
  • Feature: improved error messages from Twitter
  • Change: added Freemius service back to plug-in
  • Bug fix: disconnect Twitter account in user accounts (PRO)


  • Bug fix: wrap Twitter follow button in div to prevent obscure Blink rendering bug.
  • Bug fix: obscure bug saving incorrect short URL when saving draft


  • Bug fix: added prefix to is_valid_url (function used by some other plug-ins)
  • Bug fix: undismissable promotion for WP Tweets PRO
  • Minor style changes


  • Bug fix: functionalized uninstall, but placed in file only imported while WPT active.


  • Remove Freemius integration due to excessive API load.


  • Only call Freemius integration in admin.


  • Bug fix: uninstall issue with Freemius
  • Bug fix: extraneous function call with Freemius
  • More style streamlining


  • Bug fix: if user without permissions to edit WP to Twitter meta updated profiles, Twitter profile data was deleted.
  • Bug fix: PHP notices (2) in Twitter search widget
  • Bug fix: no notice to update settings when setting new URL shortener.
  • Bug fix: permissions tabs non functional if custom role name had a space
  • Bug fix: remove notice thrown when rate limiting is run on a Tweet not associated with a post
  • Bug fix: remove notice thrown when no error defined by custom shortener.
  • Design update in metabox panel
  • Misc. design & text updates
  • Ability to add new URL shorteners via filters (‘wpt_shorten_link’, ‘wpt_shortener_settings’, ‘wpt_choose_shortener’)
  • Remove ability to set YOURLS as a local resource in new installs
  • Added filter to disable storing URLs in post meta
  • Deprecate more old jd_ prefixed functions
  • Change admin page URL to match Pro version.
  • Remove dependency on is_plugin_active()
  • Added opt-in usage tracking via Freemius.com


  • CSS update in Twitter feed for new iframe generated follow button
  • Include target URL in information deleted when a post’s Tweet History cleared
  • Minor design changes
  • Updated manual
  • Updated text


  • Bug fix: Add support for calendar picker in WP Tweets Pro
  • New filter on random delay value


  • Bug fix: mismatched argument count in replacements caused & to be replaced with null
  • Bug fix: PHP notice on Advanced Settings screen
  • Bug fix: append/prepend fields accidentally eliminated from Tweet output in truncation rewrite


  • Rewrite: Rewrite Tweet truncation code.
  • Bug fix: Make charcount aware of #longurl#
  • Open up possibility of reposting more than 3 times in WP Tweets PRO through filters.
  • Bug fix: issue with character counting on Scheduled Tweets screen.
  • Add textdomain to plug-in header


  • New filter allows disabling storing short URLs wpt_store_urls; return false.
  • Disable migration routine as DB-wide function; handle only on post edit.
  • Eliminate some unused variables.
  • Change primary settings headings to H1 on WP 4.3 and above.
  • Removed collapsible panels in settings. These are irrelevant with tabbed interface.
  • Minor design changes.


  • CSS fix for 4.3 compatibility.
  • Avoid error if administrator role is missing.
  • Prevent setting rate limiting to 0.


  • Bug fix: Fix a fallback function for mb_substr
  • Bug fix: Missing Urlencoding on YOURLS post titles caused return as XML instead of JSON
  • Bug fix: one rate limiting setting not deleted on uninstall
  • Update Language: Australian English


  • Misnamed variable in 3.1.1.
  • Minor update to Dutch translation
  • Added partial Australian English translation


  • Add post title to Yourls shortener query. Thanks to the.mnbvcx.
  • Bug fix: Overlooked warning if categories not defined.
  • Updated wp-to-twitter.pot


  • Moved changelog entries older than 3.0.0 into changelog.txt
  • Update PHP 4 class constructors to PHP 5.
  • Added template tags for all categories and all category descriptions.
  • Better loading of text domain.
  • Improve preview character counting when featured images are being uploaded. (WP Tweets PRO)
  • Require users to add an email to send a support request.
  • Added check for constant WPT_STAGING_MODE; disables posting to Twitter on staging servers.
  • New feature: Rate limiting. Enable rate limiting to restrict the number of posts per category per hour can be sent to your Twitter account.


  • Bug fix: Twitter Feed search broken.
  • Bug fix: Display issue with support form textarea.
  • Address issue with input sources that have double encoded entities.
  • Improved: Error messages with Twitter Feed issues.
  • Add option to hide header on Twitter feed widget.
  • Language Update: Portuguese (Brazil)


  • Bug fix: missing styles from Twitter feed
  • Bug fix: test whether Tweet is possibly sensitive always returned true
  • New feature: display uploaded images in Twitter feed instead of link to image.
  • New template tag: #longurl# – use to Tweet the unshortened URL for a post.


  • Bug fix: Typo in fix for settings update screwed things up.


  • Bug fix: Error with YOURLS url handler. Two reversed variable definitions.
  • Bug fix: Bad URL for testing time check when WP Tweets PRO active.
  • Bug fix: Update could reset some settings to defaults.
  • Grammar fix to one text string.
  • Minor updates to Spanish & Portuguese translations


  • Update Japanese translation
  • Bug fix: accidentally left one debug message in override.


  • Bug fix: obscure duplicating Tweets issue related to co-Tweeting and media uploads
  • Bug fix: notice thrown if using Yourls and access to Yourls directory blocked at server.
  • Revamped settings page.
  • Updated user’s guide.


  • Changed priority of wpt_twit function on save_post action so that The Events Calendar can send Tweets.
  • Bug fix: ensure that arguments passed to URL shorteners for analytics are URL encoded.
  • Bug fix: Clear widget cache when widget is updated.
  • Bug fix: invalid argument with obsolete category filters.
  • Bug fix: inconsistent labeling of API key/consumer key.
  • Bug fix: Errors in data migration for 3.0.0 fixed.
  • Only show ‘Tweet to’ tab if individual authors options are enabled.
  • Minor updates to application setup instructions.


  • Handles case where post type identification could throw PHP warning if no post types were chosen to be Tweeted.
  • Eliminated outdated compatibility function.
  • Eliminated old update notices.
  • General code cleanup.
  • Code documentation.
  • Updated media uploading to use Uploads endpoint, replacing deprecated update_with_media endpoint. [WP Tweets PRO]
  • Simplifed short URL storage
  • Decreased widget cache life from 1 hour to 30 minutes.
  • Added fallback Normalizer class for cases when extension is not installed.
  • Added notes for the 100 HTTP code return error.
  • Moved Twitter server time check out of basic set-up & set up to only run on demand.
  • Minor design changes.