How to Add a Contact Form in WordPress, Step by Step

Summary

To add a contact form in WordPress, install a form plugin such as Fluent Forms, WPForms or the Jetpack Form block, build a short form with name, email and message, and insert it on a page with the plugin's block. Then connect an SMTP service with SPF and DKIM records so submissions reach your inbox, add a honeypot against spam, and test on the live site from a different email account.

Laptop on a wooden desk showing a simple contact form layout, with a notebook and a mug

Here is how to add a contact form in WordPress: install a form plugin, build a form with name, email and message fields, drop it on a page with the plugin's block, then route the submissions through a proper mail service so they actually arrive. The first three steps take ten minutes. The last one is where most contact forms quietly fail, and it is the part this folio spends the most time on.

WordPress core has no form block. A block theme gives you a clean page, a Group, a Columns layout and a Button, but nothing that collects and sends data. So the real question is which plugin you pick and how you wire up delivery.

Do you need a plugin to add a contact form in WordPress?

Yes, for any form you intend to keep. You can write a raw HTML form and a PHP handler in a child theme, and the tutorials that show it are accurate. But the handler then owns validation, spam filtering, nonce checks, escaping, storage and error messages. That is a small plugin you now maintain.

On a client site, the maintenance cost decides it. A handler you wrote in 2024 will still be on the site in 2028, long after you have forgotten how it handles a failed send. A maintained plugin gets security fixes you never have to think about.

Skip the hand-rolled form unless the form is part of the product. Worth it only if you are building a plugin or a very unusual workflow.

Which WordPress form plugin should you choose?

Five plugins cover almost every case. Pick on the basis of what happens after submission, not on the template gallery.

For a standard contact page on a block theme, Fluent Forms or the Jetpack block is enough. For anything that feeds a CRM, take Gravity Forms or WPForms Pro and stop comparing.

The Jetpack documentation shows how its Form block works inside the editor, including footer and template placement, which is useful even if you pick another plugin.

How do you build the form itself?

Install and activate your plugin from Plugins > Add New, then create a new form from its "Contact" or "Simple" template. Before you touch the builder, decide the fields on paper. Every extra field lowers the number of people who finish.

Pencil wireframe of a four-field contact form with a submit button on cream paper

A contact form that works for most small sites has four fields. Name, email, a message box, and an optional subject or topic dropdown if your inbox needs sorting. A phone number field is a conversion killer unless you actually phone people back.

Three settings matter more than the layout.

First, mark only email and message as required. Second, write real labels above the fields, not placeholder text inside them. Placeholders vanish while typing and fail contrast checks, which matters for WCAG 2.2. Third, set the confirmation to show a message on the same page, not a redirect, unless you need a thank-you URL for tracking.

If you work with Arabic or Hebrew, test the form in RTL before you ship it. Labels and the submit button mirror correctly in most plugins when the site language is set to an RTL locale. The email field does not always follow. Email addresses are left-to-right strings, so force dir="ltr" on that input with a small CSS rule or the plugin's custom attribute option, otherwise the cursor jumps as the visitor types the at sign.

How do you add the form to a page in the block editor?

Create a page called Contact, open the inserter with the plus button and search for your plugin's name. Every serious form plugin registers its own block. Pick it, choose the form you built, and publish.

You can also place it elsewhere. In the Site Editor, open Appearance > Editor, choose a template part such as the footer or a page template, and insert the same block there. That is the Full Site Editing way to put a short form in every footer without a shortcode.

Two layout notes from client work. Put the form inside a Group with a maximum width of around 640 pixels, because a form stretched across a 1200 pixel column reads badly. And place one line of plain text above it with a direct email address. Some visitors will not use a form at all, and giving them an address costs nothing.

Why does your contact form email never arrive?

Because WordPress sends mail through the web server's default PHP mail function, and receiving mail servers distrust it. The function wp_mail(), documented in the WordPress developer reference, hands the message to whatever the server provides. On shared hosting that is often an unauthenticated sender that fails SPF and DKIM checks. Gmail and Outlook then drop the message in spam or reject it outright.

The sneaky part is that the form shows a green success message anyway. The plugin did its job. The server accepted the message. It just never reached the inbox.

White envelope slipping through a brass mail slot on a green door

The fix has three parts.

  1. Install an SMTP plugin such as WP Mail SMTP, FluentSMTP or Post SMTP, and connect it to a transactional mail service.

  2. Set the "From" address to an address on your own domain, for example hello@yourdomain.com, never a free Gmail address.

  3. Add the SPF and DKIM records your mail service gives you to your domain's DNS, and publish a DMARC record, even a monitoring-only one.

Which service? For a contact form you send a few messages a day, so almost any transactional provider works. Postmark is built for exactly this job and keeps transactional mail on separate infrastructure from marketing mail.

If the client also wants to answer leads with a newsletter later, Brevo covers both transactional sending and campaigns under one account, with a free tier that is plenty for a small site.

A step-by-step Mailtrap tutorial walks through the same SMTP setup with screenshots if you want a second reference.

How do you stop spam without annoying real visitors?

A public form collects bots within days. The usual answer is a CAPTCHA, and it is usually the wrong first answer, because every challenge you add costs you real submissions.

Layer the defences in this order and stop as soon as the spam stops.

Start with a honeypot, a hidden field that humans never fill and bots always do. Most form plugins include one switched on by default. Add Akismet if the plugin supports it. If spam persists, add a privacy-friendly challenge such as Cloudflare Turnstile before reaching for a visible image puzzle. Reserve a classic reCAPTCHA checkbox for forms that are under sustained attack.

Also rate-limit at the server level if you can. One IP sending forty submissions a minute is not a visitor.

On the legal side, if the site serves visitors in the EU, add an unticked consent checkbox that links to the privacy policy, and set the plugin to avoid storing entries longer than you need. Many plugins keep every submission in the database forever by default. Change that.

How should you test the form before handing it over?

Test it like a stranger would, and test it on the live domain, not on staging. Staging often blocks outgoing mail, so a pass there proves nothing.

Hands typing at a keyboard beside a phone, testing a form submission in the evening

Submit the form from a phone on mobile data with a Gmail address, then again with an Outlook address. Check the inbox and the spam folder of the receiving address. Open the message headers and look for spf=pass and dkim=pass. Submit once with every field empty and once with a deliberately broken email to see that the error messages are clear and readable by a screen reader.

Then fill the form in with only the keyboard. If you cannot reach the submit button with Tab or see which field has focus, fix the focus styles in your theme.

Marginalia: keep a log. Add a plugin or a mail service feature that stores sent messages, so when a client says "I never got that enquiry" you can answer in a minute instead of an afternoon.

When is a form plugin the wrong tool?

Sometimes a contact form is not what the visitor needs. For a shop, a support widget that reads order data beats a blank message box. For a lead-gen landing page, the form belongs inside a larger flow with tracking.

If submissions need to land in a CRM or a spreadsheet, send them there directly instead of copying emails by hand. A form plugin with a Zapier connection can push each entry to Sheets, Slack or your project tracker in a few clicks.

And if the form is the front door to a sales pipeline, a CRM with its own embeddable forms removes a plugin from your stack and keeps contact history in one place. HubSpot's free forms are the common example.

The pattern is the same everywhere. The form is the easy ten minutes. The delivery, the spam rules and the follow-up are the work. Open your own site's contact form tonight, send yourself a message from a different account, and see how long it takes to arrive.

Frequently asked questions

Can I add a contact form in WordPress without a plugin?
Yes, with a custom HTML form and a PHP handler in a child theme. You then own validation, spam filtering, escaping and storage, so for client sites a maintained plugin is the safer choice.
What is the best free contact form plugin for WordPress?
Fluent Forms and the Jetpack Form block are the easiest free options for a standard contact page. Contact Form 7 is also free but has no visual builder.
Why are my WordPress contact form emails going to spam?
WordPress sends mail through the server's default PHP mail function, which usually fails SPF and DKIM checks. Use an SMTP plugin with a transactional mail service and add the DNS records it gives you.
Does WordPress have a built-in contact form block?
No. WordPress core has no form block, so you need a plugin such as Jetpack, WPForms, Fluent Forms, Contact Form 7 or Gravity Forms.
How do I stop spam on a WordPress contact form?
Start with a honeypot field, add Akismet if your plugin supports it, then use a privacy-friendly challenge such as Cloudflare Turnstile. Keep visible CAPTCHAs for sustained attacks.
Can I put a contact form in the footer of a block theme?
Yes. Open Appearance > Editor, select the footer template part, and insert your form plugin's block where you want it.