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.
Recent Comments