Support » Plugin: WP-Matomo (WP-Piwik) » [Plugin: WP-Piwik] HTTPS (SSL) support

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author braekling


    Hi MC,

    WP-Piwik normally should work with SSL as well:

    – The tracking code chooses the protocol used by the visitor automatically.
    – The API calls are done using your entered URL.
    – The API calls use fopen or cURL. Both should support SSL. The certificate is trustable? See

    Maybe I overlook a fault? Please give me an example.

    Best regards

    Hi André

    Thanks for your message.
    Yes, indeed. I am using CAcert[0] certificates, which were, surprisingly, disabled in the file containing the list of trusted certificates on the GNU/Linux Debian host.

    So I reenabled the respective certificates and updated the certificates list.
    update-ca-certificates --fresh

    After this wp-piwik accepted the https host.

    As you were saying, the following quick fix in wp-piwik.php also does the job.
    curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);

    Thanks for your advice and kind regards, MC


    I have added the line, and now it works for me:

    curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);

    But i have to add the line again with every update of the module. Isn’t there a better way to fix this issue?

    Also, since i added the line, i get another error:
    An error occured: The method ‘getPiwikVersion’ does not exist or is not available in the module ‘Piwik_API_API’. [Support]

    Plugin Author braekling


    1. You can fix this issue by using a valid certificate or by adding your certificate to your configuration as described above by mcantsin.

    I thought about some kind of “don’t verify SSL certs” option, but I’m not happy on adding a feature which means “use a SSL certificate, but don’t care about its validity”. It would lead the SSL idea ad absurdum, wouldn’t it?

    2. Please update your Piwik to the latest version. WP-Piwik requires at least Piwik 1.8.2.

    mcnesium:~$ sudo dpkg-reconfigure ca-certificates
    Updating certificates in /etc/ssl/certs….done.
    mcnesium:~$ sudo update-ca-certificates –fresh
    Clearing symlinks in /etc/ssl/certs…done.
    Updating certificates in /etc/ssl/certs….done.
    mcnesium:~$ ll /etc/ssl/certs/ | grep
    lrwxrwxrwx 1 root root 48 2012-08-25 18:53 class3.pem -> /usr/share/ca-certificates/
    lrwxrwxrwx 1 root root 46 2012-08-25 18:53 root.pem -> /usr/share/ca-certificates/

    still not working with my setup. whenever i change the piwik url (rest api) from http to https i get a php error at the top

    Warning: implode() [function.implode]: Bad arguments. in /…/wp-piwik.php on line 438

    and at the bottom it says

    An error occured: Please check URL and auth token. You need at least view access to one site. [Support]

    the token works fine with http. i currently use both the latest versions wp 3.4.1 and wp-piwik 0.9.5

    Plugin Author braekling


    Can you try to add curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); to WP-Piwik as explained above?

    Hi,I’m having trouble getting this plugin to work as well.

    Have a self signed ssl certificate because I just use the domain where piwik is installed for stats only. No need to purchase certificate just for myself. So trying to use ssl, with this wordpress plugin, and keep getting this error message

    n error occured: Please check URL and auth token. You need at least view access to one site. [Support]

    1. Piwik installed using self signed ssl certificate on separate domain from where my wordpress site is installed

    2. I’ve tried adding the line
    curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);

    to wp-piwik php plugin but then I get site errors so the site won’t display properly.

    Where exactly should the curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);

    be placed in the wp-piwik.php file?

    3. sure wish that this was a bit easier for those of us using ssl who don’t want to purchase a certificate just to run stats.

    Thanks for the help and for the plugin…just hoping I can get it to work.

    Plugin Author braekling


    Hi mj2,

    try to add the curl_setopt line behind $c = curl_init($strURL);

    Are you sure your setup supports cURL? Maybe you are connecting via fopen?

    The next release contains an option to set this curl option (and a similar fopen option) via settings.

    Plugin Author braekling


    Note: “Disable SSL peer verification” option added in 0.9.6. The update will be released within the next few days.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: WP-Piwik] HTTPS (SSL) support’ is closed to new replies.