If you're like me, most of your WordPress plugins are checked out into your plugins directory from the official WordPress SVN repository or some other one. I haven't updated any of mine for about a month and wanted to sync up everything quickly (including SVN externals). Here's a short command I ran to achieve that:
1 2 | cd YOUR_BLOG_ROOT/wp-content/plugins; find . -maxdepth 1 -type d -exec svn up {} \; |
What this command does is finds the top level directories in your WordPress plugins directory, then applies the "svn update" command to each, one by one.
The result is something like
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | Fetching external item into 'akismet' A akismet/readme.txt Updated external to revision 50666. Updated to revision 8094. At revision 8094. U share-this/sharethis.php Updated to revision 50666. D wp-postratings/postratings-admin-js.php D wp-postratings/postratings-usage.php D wp-postratings/postratings-js.php A wp-postratings/postratings-js-packed.js U wp-postratings/wp-postratings.php A wp-postratings/postratings-admin-js.js U wp-postratings/postratings-css.css U wp-postratings/postratings-options.php A wp-postratings/postratings-templates.php U wp-postratings/postratings-stats.php U wp-postratings/readme.html A wp-postratings/postratings-js.js U wp-postratings/wp-postratings.pot U wp-postratings/wp-postratings-widget.php U wp-postratings/postratings-uninstall.php U wp-postratings/postratings-admin-ajax.php U wp-postratings/wp-postratings.mo U wp-postratings/readme.txt U wp-postratings/postratings-manager.php A wp-postratings/postratings-admin-js-packed.js Updated to revision 50666. At revision 8094. ... |
With such mass updating, of course, an incompatibility in one of the updates can break the whole blog. In my case, it happened to be the latest version of wp-sticky. I identified it by disabling wp-super-cache first, then disabling each updated plugin one by one. Once identified, I did the following:
1 2 | cd wp-sticky svn log | head |
That showed me the latest commits by the author as well as the SVN revision numbers. I then used this information to revert one revision back by doing:
1 | svn up -r 50489 |
The following command showed a diff of what exactly changed in that revision and broke everything:
1 | svn diff -r50489:50490 |
Once everything was stable, I emailed the plugin author to tell him about the bug (heya, Lester). Be careful not to run 'svn up' on this directory again until the bug is fixed as it'll persistently update to the latest version.
In the meantime, if you found this article useful, feel free to buy me a cup of coffee below.