We have probably all been there. You publish a blog post, post it to social, and then you realize there is a grammar or spelling mistake. Or perhaps you update the picture. Well, before deleting your tweet there is actually a way to clear the cache manually. Follow the directions below on how to clear Twitter cache using the Twitter Card Validator in one easy step. You can then get back to reposting it on social.
How to Clear Twitter Cache
So in this example, we will take a look at a Tweet in which I screwed up lol. In the description of the post below, you can see the wording “…WordPress permalinks and it allows site admins…” As you can see this should really be “…WordPress permalinks and how they allow site admins…” to be grammatically correct.
So instead of deleting the Tweet I fix the description in the WordPress post first and re-save it. Then I head over to the Twitter Card Validator tool. I insert the URL of the blog post and hit “Preview card.” This actually clears the cache on the Twitter side. As you can see below in the Tweet, it is now correctly showing the updated description.
You can see the final tweet here:
In-Depth Look at WordPress Permalinks and URL Rewriting https://t.co/mMeAJHqQkA #WordPress #webdev @kinsta
— Brian Jackson (@brianleejackson) October 17, 2016
How to Clear Twitter Cache on Images
Images are a little trickier as images on Twitter are cached based on the URL. This often causes images to not update when the above Card refresh technique is used. To workaround this issue, you can add an extra parameter at the end of your image URL so that the Twitterbot treats the image as a unique URL and re-fetches the image. You can rename your featured image in WordPress and re-upload it with a different file name.
For SEO purposes I recommend simply adding a number on the end.
Then re-run the Twitter Card Validator tool and you will see your new image.
You can also do the same thing with the Facebook Open Graph Debugger tool. So the next time you mess up a blog post, instead of taking back your Tweets and FB posts, simply clear the cache on their side and your good to go! If this tutorial on how to clear Twitter cache using the Twitter Card Validator was helpful, feel free to let me know below.
9 thoughts on “How to Clear Twitter Cache in One Easy Step”
Brian, you are the man. Remembered this post and it saved me today. Thanks man
Great, glad it was helpful!
Your information about the image cache on Twitter being invalidated is incorrect. The only way to invalidate the image cache is to change the URL by adding some junk parameters to the end or actually giving the image a new URL.
Ya I have seen this work sometimes with images and then others not. I have updated the post above to include the image renaming trick. I always just add a -1 or -2.
Thank for this. Came in handy today.
Brian, I just wanted to share a hearty “thank you!” for posting this article. I came across it via google search for trying to do this very thing after I fat-fingered the text in a post snippet/card. I really appreciate the link going to the equivalent Facebook tool, as well. It’s good to know the tricks from a few years ago still work just fine today!
So glad this was helpful! I probably clear cache on Twitter and FB URLs 10+ times a week with all the updates I’m doing. Having these tools can come in very handy :)
It worked!!! Thank you so much. SAVED!
This is brilliant. Thank you so much! Even a “technically challenged” like myself can do this.