Add a Mailchimp signup form block, widget, or shortcode to your WordPress site.
Use the Mailchimp List Subscribe plugin to quickly add a Mailchimp signup form block, widget, or shortcode to your WordPress site.
After installation, if you already have a Mailchimp account, you'll log in with that account and then proceed to configure settings.
If you don't have an account, you can create one directly in the plugin. After entering in all your personal details, you'll need to activate your account via an email that will be sent to you. Once done, you'll proceed to configure settings.
On the settings screen, you'll select your Mailchimp list, choose merge fields and groups, and configure other options. Once done, you can now add the block, widget, or shortcode to your site. Typically, installation and setup will take about 5-10 minutes, and absolutely everything can be done via the WordPress Setting GUI, with no file editing at all.
WordPress.com compatibility is limited to Business tier users only. How to add a signup form if you have a WordPress.com site.
Starting in version 1.6.0, authentication has changed to use OAuth. As part of this process, we retrieve an access token that can be used to make API requests. To provide a high-level of security, this access token is encrypted before being stored in the WordPress database. In order to ensure this access token can be decrypted when used, the plugin relies on certain security constants that should remain unchanged.
With no additional configuration, we use the standard LOGGED_IN_KEY
and LOGGED_IN_SALT
constants that are normally set in your site's wp-config.php
file. Some sites make use of security plugins that rotate these constants on a periodic basis. When this happens, we won't be able to decrypt the access token and you’ll need to reconnect your Mailchimp account to generate a new access token.
To prevent such issues, it is recommended to define two additional constants in your site's wp-config.php
file: MAILCHIMP_SF_ENCRYPTION_KEY
and MAILCHIMP_SF_ENCRYPTION_SALT
. These constants should consist of a combination of characters, preferably at least 32 characters long. Once set, these values should not be changed. For strong values, you can copy some of the values from here and use them. You'll end up with additional code like the following in your wp-config.php
file:
define( 'MAILCHIMP_SF_ENCRYPTION_KEY', 'put your unique phrase here' );
define( 'MAILCHIMP_SF_ENCRYPTION_SALT', 'put your unique phrase here' );
If these constants are added after you've already authenticated with Mailchimp, you will need to reconnect your account. To avoid this, you can copy the values from LOGGED_IN_KEY
and LOGGED_IN_SALT
(if they exist) to MAILCHIMP_SF_ENCRYPTION_KEY
and MAILCHIMP_SF_ENCRYPTION_SALT
respectively.
This section describes how to install the plugin and get started using it.
- Unzip our archive and upload the entire mailchimp directory to your
/wp-content/plugins/ directory
. - Activate the plugin through the Plugins menu in WordPress.
- Navigate to the Mailchimp menu.
- Click the Log in button and proceed through the OAuth flow, logging in to your Mailchimp account and authorizing the application. If you don't have an acccount, instead click the "Create an account" button to create one.
- Select the list where you want to send new Mailchimp subscribers.
- Optional: Turn Merge Fields and Groups on or off. Navigate to Appearance, and click Widgets. Drag the Mailchimp Widget into one of your Widget Areas.
- Optional: adjust frontend site display with available CSS options.
If you are upgrading to version 1.2.1 and you used the widget in your sidebar previously, all you need to do is drag the Mailchimp Widget
back into the sidebar, visit the Mailchimp settings page (which will have maintained your prior settings), click the "Update List" button, and you're done!
If you are upgrading to version 1.6.0, you will need to updated any references to display function mailchimpSF_signup_form
to mailchimp_sf_signup_form
.
If you have a custom-coded sidebar or something that prevent enabling widgets through the WordPress GUI, complete these steps instead.
WordPress v2.8 or higher:
[mailchimpsf_form]
If you are adding it inside a php code block, add this:
mailchimp_sf_signup_form();
Or, if you are adding it within HTML, use this:
<?php mailchimp_sf_signup_form(); ?>
Where ever you want it to show up.
No, only one form should exist per page, no matter the display type (block, widget, or shortcode).
You need to ensure that the fields are enabled both in your Mailchimp account (Audience > Signup forms) and in the settings of this plugin. Once the fields are enabled in both places, then they'll appear in the editor and frontend of your site.
Internationalization (i18n) is available on GlotPress at https://translate.wordpress.org/projects/wp-plugins/mailchimp/. Any assistance translating the plugin is greatly appreciated!
The tests
directory contains end-to-end tests for the project, utilizing Cypress to run tests in an environment created using wp-env.
- Node.js v20
- Docker
- Create an account in Mailchimp
- Run
npm install
. - Run
npm run build
. - Run
npm run env:start
. - Set Mailchimp credentials as environment variables:
- run
export CYPRESS_MAILCHIMP_USERNAME="your mailchimp username"
- run
export CYPRESS_MAILCHIMP_PASSWORD="your mailchimp password"
- run
- Run
npm run cypress:run
. You can also runnpm run cypress:open
to run tests in UI mode.
Active: Mailchimp is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.