Over the weekend I was jumping back into some old code that I wanted to turn into a simple plugin. (That plugin that lets you insert any widget anywhere in your site with a shortcode is now available.) But during the course of my packaging this up, I also wanted to add in the ability to use auto-updating. So that anyone who downloaded my plugins would automatically get any feature enhancements and bug fixes without having to redownload the plugin.
So I found some code api here at CodeCanyon, (WordPress Update Plugin), that will gave me the necessary tools to turn a simple plugin into an auto-updating plugin. But now I ran into a problem. If I wanted to test to make sure the code was working so that the plugin would update, I needed to force WordPress to check and see if there was an update available. So, here’s a little WordPress hack to make this happen.
You just need to run a simple MySQL query (if you don’t like working on the command line you can also use PHPMyAdmin to run this query).
update wp_options set option_value='' where option_name='_site_transient_update_plugins';
Now you can head back to your Admin Plugin area and if there are updates available, you will see them immediately. Hope this little code hack helps you.
RT @benjaminbradley: Want to force your WordPress site to check for plugin updates? Run this little MySQL query -> http://t.co/VBFEv2rh
Or as I completely forgot you can select the plugin you want to update by checking the select box, then go to the bulk action drop down and select update. It should force the plugin to check for an update.
Hahaha… or the even easier method which is so easy I forgot about. Just go to the WordPress updates page in your admin dashboard and click the “Check Again” button. http://twitpic.com/7z4h13 Thank you @jkudish for that reminder.