So I’ve convinced you that switching plugins from Click to Tweet by the folks over at TodayMade (the makers of the top-notch content marketing editorial calendar CoSchedule) is worth it. But what about all of those tweet quotes you’ve already added to dozens (if not hundreds) of blog posts?
Going back through to switch each quote manually is a huge headache at best, or a deal-breaker at worst.
This is a tutorial for how to do it in fewer than 10 minutes, with one plugin and a few clicks.
Warning: read carefully, and you should be fine. Skip ahead and you could irreparably (translation, I can’t fix it even if I wanted to) damage the database, and mess up everything.
The first thing you’ll need to do is download and configure the Better Click To Tweet plugin. The two plugins should peacefully coexist, so don’t uninstall the old plugin until the end of this tutorial.
Next, before you do anything on WordPress (especially related to the database) always take a full backup, stored on your local computer (or some cloud backup server). I trust you understand that backups are a non-negotiable must-have for anybody who wants to keep anything they’ve ever said on their website, so this is more fundamental than the scope of this tutorial.
There are several solutions out there for backups, the most respected being VaultPress (made by the folks over at Automattic, the step-parent of WordPress).
I have also used BackupBuddy from iThemes, and have heard great stuff about Migrate DB pro. I don’t care how you back everything up, just that you DO back everything up. (shameless plug: I offer that as a service) Also, it’s worth having a test site to make sure you know how to restore from that backup.
Please don’t skip this step, because I won’t be able to help you get back everything if you do something even just slightly wrong.
::climbs down off of soapbox::
Now, for a bit of a basic lesson on how WordPress works. The database stores all of the words on your site, including pages, posts, and other content. For our purposes today, we are looking to find every instance of the old Click To Tweet code that looks like this:
[Tweet "Some tweetable quote..."]
And replace it with our nice new Better Click To Tweet WordPress shortcode:
[bctt tweet="Some tweetable quote..."]
Note that all we need to replace is the beginning portion of the old pseudo-shortcode. Everything after (and including) the first quotation mark can remain unchanged.
To make that change, we need to do what is appropriately called a “search and replace” on the database. There are several plugins in the official WordPress.org repository that claim to be able to make the changes. The one I have used and recommend (despite the fact that it has the ominous WordPress warning “this plugin has not been tested with your version of WordPress”) is Search Regex.
Install the plugin, make sure you’ve gotten a full backup that you can confidently restore from, and configure the plugin like so (this page can be found under the “Tools” menu in your admin area):
The first time around, click the replace button, and scroll down to see the proposed changes. If those look right (make sure that the spacing is correct in the new shortcodes!), scroll back to the top and click “Replace and Save.”
As they say in France, “Voila!” You have upgraded your Click To Tweet experience, and future-proofed your WordPress site!
You may now (after you verify that everything looks satisfactory on the front end of your site) safely deactivate and uninstall the Click to Tweet plugin by TodayMade.
If you run into any issues, restore from the backup I insisted you make above, start a thread on the support forums (so that everyone can benefit from our back-and-forth), and I will happily help you get switched over!
Welcome to the Better Click To Tweet family. Why not let others know how great it is:I just switched to Better Click To Tweet with the help of this tutorial! Click To Tweet