Rusty Russell's Coding Blog | Stealing From Smart People

Oct/09

27

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/config-rusty.ozlabs.org.php
  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
    quit;
  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!

RSS Feed

2 Comments for Google Analytics For WordPress Upgrade Fail

Jeff Waugh | October 30, 2009 at 4:14 pm

Meanwhile, I recommend Google Analyticator for your WordPress / Google Analytics needs. :-)

(Welcome to the world of WordPress!)

Author comment by rusty | October 30, 2009 at 6:30 pm

Done. How sweet, more graph porn at my fingertips!

Leave a comment!

«

»

Find it!

Theme Design by devolux.org

Tag Cloud