Skip to content

How to Set Contact Form 7 in WordPress

Contact Form 7 is one of the most popular plugins for adding contact forms to WordPress sites. This guide walks you through installing, configuring, and embedding a fully functional form in minutes—no coding required.

Key Takeaways

  • Easy Installation: Contact Form 7 can be installed directly from the WordPress plugin directory in just a few clicks.
  • Customizable Forms: Use simple tags to add fields like name, email, subject, and message to your form.
  • Spam Protection: Built-in support for reCAPTCHA helps keep your inbox free from spam submissions.
  • Email Notifications: Automatically send form submissions to your email and set up auto-responses for users.
  • Shortcode Integration: Embed your form anywhere on your site using a simple shortcode.
  • Troubleshooting Tips: Learn how to fix common issues like emails not sending or forms not displaying.
  • Best Practices: Keep forms simple, test regularly, and ensure mobile responsiveness for better user experience.

How to Set Contact Form 7 in WordPress

If you’re running a WordPress website, chances are you’ll want a way for visitors to reach you. Whether it’s for customer support, lead generation, or general inquiries, a contact form is essential. One of the easiest and most reliable ways to add a contact form is by using Contact Form 7, a free plugin trusted by millions of websites worldwide.

In this guide, you’ll learn how to set up Contact Form 7 in WordPress from start to finish. We’ll cover installation, configuration, customization, and troubleshooting. By the end, you’ll have a fully working contact form ready to collect messages from your visitors—no technical skills required.

Step 1: Install Contact Form 7 Plugin

The first step is to install the plugin on your WordPress site. Here’s how:

Go to Your WordPress Dashboard

Log in to your WordPress admin area. This is usually accessible by going to yoursite.com/wp-admin.

Navigate to Plugins

In the left-hand menu, click on Plugins, then select Add New.

Search for Contact Form 7

In the search bar at the top right, type “Contact Form 7.” The plugin should appear as the first result, developed by Takayuki Miyoshi.

Install and Activate

Click the Install Now button. Once the installation is complete, click Activate. The plugin is now ready to use.

Tip: Always keep your plugins updated to ensure security and compatibility with the latest version of WordPress.

Step 2: Create Your First Contact Form

How to Set Contact Form 7 in WordPress

Visual guide about How to Set Contact Form 7 in WordPress

Image source: acymailing.com

Once activated, Contact Form 7 adds a new menu item to your dashboard called Contact. Let’s create your first form.

Go to the Contact Menu

Click on Contact in the left sidebar, then select Contact Forms. You’ll see a default form already created—this is your starting point.

Edit the Default Form

Click on the title of the default form (usually “Contact form 1”) to open the editor. Here, you’ll see the form fields in a text box. This is where you define what fields appear on your form.

The default form includes:
– Your Name (required)
– Your Email (required)
– Subject
– Your Message (required)

These fields use special tags like [text* your-name] and [email* your-email]. The asterisk (*) means the field is required.

Customize the Form Fields

You can modify the form to suit your needs. For example, if you want to add a phone number field, simply add:
[tel your-phone]

Or for a dropdown menu:
[select your-service "Web Design" "SEO" "Consulting"]

Tip: Keep your form short and focused. Only ask for essential information to increase submission rates.

Step 3: Configure Email Settings

Now that your form is set up, you need to tell WordPress where to send the messages.

Go to the “Mail” Tab

In the form editor, click on the Mail tab. This is where you configure email notifications.

Set the “To” Field

Enter the email address where you want to receive form submissions. For example:
yourname@yoursite.com

Important: Use an email address that’s hosted on your domain (e.g., info@yoursite.com) to reduce the chance of emails being marked as spam.

Set the “From” Field

Use the tag [your-name] <[your-email]> so the email appears to come from the person filling out the form.

Customize the Subject Line

In the Subject field, you can use:
New message from [your-name]

This makes it easy to identify the sender in your inbox.

Message Body

The Message body section includes all the form data. The default setup usually includes:
From: [your-name] <[your-email]>
Subject: [your-subject]

Message Body:
[your-message]

You can customize this further if needed.

Save Changes

Don’t forget to click Save at the bottom of the page.

Step 4: Add reCAPTCHA for Spam Protection

Spam submissions are a common issue with contact forms. Contact Form 7 supports Google reCAPTCHA to help prevent bots from flooding your inbox.

Enable reCAPTCHA

In the form editor, go to the Integration tab. Click on reCAPTCHA and follow the instructions to get your site key and secret key from Google.

Add reCAPTCHA to Your Form

Once configured, add the following tag to your form:
[recaptcha]

Place it just above the submit button for best results.

Tip: Use reCAPTCHA v2 (“I’m not a robot” checkbox) for better user experience.

Step 5: Embed the Form on Your Website

Now that your form is ready, it’s time to add it to a page or post.

Copy the Shortcode

In the Contact Forms list, hover over your form and click Copy under the shortcode column. It will look something like:

    Paste the Shortcode

    Go to the page or post where you want the form to appear. In the block editor, add a Shortcode block and paste the code inside.

    Alternatively, you can paste the shortcode directly into the classic editor.

    Publish or Update

    Once the shortcode is added, click Publish or Update to make the form live.

    Pro Tip: Create a dedicated “Contact” page for better user experience. You can learn more about setting up a professional contact page here.

    Step 6: Test Your Contact Form

    Before promoting your form, always test it to make sure everything works.

    Fill Out the Form

    Visit the page where your form is embedded and fill it out with test data.

    Submit and Check Email

    Click the submit button. You should receive the message in your inbox within a few minutes.

    Check for Errors

    If you don’t receive the email:
    – Check your spam folder.
    – Ensure the “To” email in the Mail tab is correct.
    – Verify that your hosting provider allows WordPress to send emails.

    Tip: Use a plugin like WP Mail SMTP if emails aren’t sending. It helps route emails through a reliable service like Gmail or SendGrid.

    Troubleshooting Common Issues

    Even with careful setup, you might run into problems. Here are solutions to the most common issues:

    Form Not Displaying

    – Make sure the shortcode is correctly pasted.
    – Check that the form ID matches the one in your Contact Forms list.
    – Clear your site and browser cache.

    Emails Not Sending

    – Confirm the “To” email address is valid.
    – Install and configure WP Mail SMTP for better email delivery.
    – Check if your hosting provider blocks PHP mail() function.

    reCAPTCHA Not Working

    – Ensure you’ve entered the correct site and secret keys.
    – Clear your browser cache and try again.
    – Make sure your site URL matches the one registered with Google reCAPTCHA.

    Form Styling Looks Off

    Contact Form 7 uses minimal CSS. To improve appearance:
    – Add custom CSS via the WordPress Customizer.
    – Use a plugin like Contact Form 7 Style to apply pre-designed themes.

    Best Practices for Using Contact Form 7

    To get the most out of your contact form, follow these best practices:

    • Keep it simple: Only ask for necessary information. Too many fields can reduce submissions.
    • Use clear labels: Make sure each field is easy to understand.
    • Add a privacy notice: Let users know how their data will be used, especially if you’re collecting emails for marketing.
    • Test regularly: Check your form periodically to ensure it’s working, especially after WordPress updates.
    • Use auto-responses: In the Mail (2) tab, set up an automatic reply to thank users for reaching out.

    Conclusion

    Setting up Contact Form 7 in WordPress is a straightforward process that can greatly improve how visitors interact with your site. From installation to customization and testing, this plugin offers powerful features without requiring any coding knowledge.

    By following this guide, you’ve learned how to create a functional, secure, and user-friendly contact form. Whether you’re building a business site, blog, or portfolio, a well-designed contact form is a must-have.

    Remember to test your form, protect it from spam, and keep it updated. With Contact Form 7, you’re not just adding a form—you’re opening a reliable line of communication with your audience.

    Ready to take your WordPress site to the next level? Explore more tips on optimizing your site’s functionality and user experience with our contact page setup guide and other helpful resources.