Thread tagged as: Problem, MailChimp

Mailchimp Webhooks


I'm using the MailChimp app. I installed on the local version, and everything synced with my clients lists, subscribers and webhooks. The webhook URLs had my local domain (eg in rather than live as you would expect.

When I launched on live, I obviously want to re-set up my webhook URLs to act on the live site. I hit sync, and the same URLs show up. Even when I deleted the webhooks in the database, they came back with in. As a last resort, I deleted all the Mailchimp tables from the database, and they were automatically re-created from scratch, still with in.

I tried a different API key. Has the domain somehow been set in Mailchimp rather than in Perch?


Perch: 2.8.31, PHP: 5.6.22, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_forms (1.8.3), perch_blog (5.0), perch_mailchimp (3.0.1), perch_twitter (3.5.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', //    'perch_twitter', 'perch_mailchimp', );
PERCH_PATH: /var/sites/f/
PERCH_CORE: /var/sites/f/
PERCH_RESFILEPATH: /var/sites/f/
Image manipulation: GD
PHP limits: Max upload 100M, Max POST 100M, Memory: 128M, Total max file upload: 100M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
DOCUMENT_ROOT: /var/sites/f/
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Paul Bell

Paul Bell 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have PERCH_MAILCHIMP_BASE_URL defined?

No, I don't. Would that sort it? I can't see that in docs anywhere...

I may have found an alternative resolution by updating the webhooks directly in Mailchimp (for each list in the List > Settings >Webhooks page). So I think I may be sorted.

I had this all set up without specifying the list ID in my template, so although the form appeared to work it wasn't subscribing anyone - my fault obviously. That is sorted too now.


Drew McLellan

Drew McLellan 2638 points
Perch Support

Unless you set it, the app with use $_SERVER['HTTP_HOST'] for the base URL for the web hooks.

So in most cases you don't need to set PERCH_MAILCHIMP_BASE_URL. If you're not getting the desired result, it's there to give you control.

OK, cool. I think because I installed locally and then uploaded I had to edit in Mailchimp in any case. I guess if I'd set PERCH_MAILCHIMP_BASE_URL before install the webhooks would have been created correctly first time round.