[resolved] Piwik Server Migration Bug (4 posts)

  1. devgineer
    Posted 2 years ago #

    If you change the domain for your piwik server, the plugin has the potential to freeze up your login and there is no way to recover from the GUI.

    1) Configure wp-piwik to use e.g. stats.somedomain.com (show stats on dashboard)
    2) Change piwik server DNS e.g. stats.anotherdomain.com
    3) Sign in to your WordPress site (site won't load)

    1) go to a page on your wordpress and click edit (now your in the site). DO NOT GO TO DASHBOARD
    2) Go to plugins and delete wp-piwik
    3) go to phpMyAdmin, Workbench, or your query tool of choice and delete piwik options by running this script:
    -- start script
    DELETE FROM wp_options WHERE wp_options LIKE '%wp-piwik%'
    -- end script
    it will delete two records.
    4) install wp-piwik and reconfigure.

    1) When plugin is deleted, delete configuration in wp_options
    2) Have a link (or button) to delete configuration data
    3) Have a link (or button) to update piwik server

    If I go into the DB through MySQL Workbench or phpMyAdmin and try to update the settings manually I get the following error
    "Fatal error: Access to undeclared static property: wp_piwik::$bolWPMU in /home/.../wp-content/plugins/wp-piwik/update/80403.php on line 15"

    I discovered this by accident as I just mess around on WordPress to see what all the fuss is about. I might run important sites on it soon, not sure yet. I would probably have been more careful in migrating the DNS records on a more important site. But the bug is found and I hope my notes help you out in improving this great plugin.


  2. braekling
    Plugin Author

    Posted 2 years ago #

    Thank you very much for your detailed report.

    Looks like there are no timeouts which stop endless file requests. I'll try to fetch within WP-Piwik.

    Currently WP-Piwik offers a rest functionality (/wp-admin/options-general.php?page=wp-piwik/wp-piwik.php&tab=support&mode=reset) but this won't reset the Piwik URL. I'll also add a full reset link so you won't have to manipulate the database on your own.

    In any case an uninstall method is planned very soon because it is a "milestone" on my road to version 1.0 :-)

  3. Brian Brown, Ph.D.
    Posted 2 years ago #

    If you don't feel comfortable with phpMyAdmin or don't have access to it for some reason, install a plugin like WP Options Optimizer (http://wordpress.org/extend/plugins/options-optimizer/)
    activate and run it and then do a search for 'piwik" (without the quotes) and delete those entries.
    I love this plugin!
    Brian Brown, Ph.D.
    [ Signature moderated. ]

  4. braekling
    Plugin Author

    Posted 2 years ago #

    0.9.8 allows a full reset:

    It also comes with a connection timeout which should avoid the freeze.

    Release soon.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Piwik
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic