Google Analytics For WordPress Upgrade Fail

Had an old copy of the “Google Analytics For WordPress” lying around (which didn’t seem to put anything in my blog source), but after upgrading it it kept saying “Google Analytics settings reset to default” whenever I tried to change anything.

See this thread which talks about the problem and waves at the solution.  Here’s what you need to do, if like me you’re not a WordPress/MySQL junkie and want simple instructions:

  1. Find your wordpress config file.  Mine, on a Debian system, was in /etc/wordpress/
  2. It will contain lines like this:
    define('DB_NAME', 'rustyozlabsorg');
    define('DB_USER', 'rustyozlabsorg');
    define('DB_PASSWORD', 'g1812fbsa');
  3. You need to open the mysql database, we’re going to do some brain surgery to remove the old cruft:
    $ mysql --user=rustyozlabsorg --password=g1812fbsa rustyozlabsorg
  4. This should give you a “mysql>” prompt, where you type the following:
    DELETE FROM wp_options where option_name='GoogleAnalyticsPP';
  5. It should say something like “Query OK, 1 row affected (0.00 sec)”. Then type
  6. You’re done.  Reload your setting page and try again.

Hope that gets into Google and helps someone else who can’t figure out what’s going on!

Rusty Finally Enters Web 1.1

Jeff Waugh long ago suggested I switch to WordPress.  I had a few toy blogs with WP, and it worked well, but the final motivation to stop banging out raw HTML and feeding it to blosxom was that I have a new Android phone (I lost my second-hand one sometime at the last farm visit, so it was time to ask the Ozlabbians who know this stuff what to get: the answer was the HTC Magic).  And being able to blog on the train increases the chance that I’ll actually blog regularly.