A contact form lets your visitors send you messages directly from your website without revealing your email address. The easiest way to add a form in WordPress is by using the free Contact Form 7 plugin. It is lightweight, reliable, and easy for beginners to use.
Step 1: Install and Activate Contact Form 7
- Log in to your WordPress dashboard.
- Go to Plugins → Add New.
- In the search box, type Contact Form 7.
- Click Install Now, then Activate.
Once activated, you will see a new menu item called Contact in your dashboard.
Step 2: Create a New Form
- Go to Contact → Add New.
- Give your form a title such as “Contact Us.”
- Delete any code in the form editor, then paste this code:
<label> Your Name (required)
[text* your-name akismet:author]
</label>
<label> Your Email (required)
[email* your-email akismet:author_email]
</label>
<label> Subject
[text your-subject]
</label>
<label> Your Message
[textarea your-message akismet:comment_content rows:6]
</label>
[submit class:cf7-default "Send"]
This form includes four basic fields: name, email, subject, and message. The two asterisks (*) mark the required fields. The Akismet tags help reduce spam messages.
Click Save when you’re done.
Step 3: Add the Form to a Page
After saving, Contact Form 7 will show you a shortcode that looks like this:
[contact-form-7 id="1234" title="Contact Us"]
Copy that shortcode.
Now go to Pages → Add New, and create a new page called Contact (or open an existing one). Paste the shortcode into the content area. Publish or update the page.
You now have a working contact form on your site.
Step 4: Add a Little Spacing and Default Styling
The form will automatically use your theme’s fonts and colors. If you want slightly better spacing, you can add this simple CSS under Appearance → Customize → Additional CSS:
.wpcf7 label {
display:block;
margin-bottom:8px;
font-weight:500;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
width:100%;
padding:10px;
font-size:1rem;
border:1px solid #ccc;
border-radius:6px;
box-sizing:border-box;
}
.wpcf7 input[type="submit"].cf7-default {
background:buttonface;
color:buttontext;
padding:10px 18px;
border:1px solid #ccc;
border-radius:6px;
cursor:pointer;
}
.wpcf7 {
max-width:600px;
margin:auto;
}
This CSS uses your theme’s default button color and font, so it blends naturally with your website design.
Step 5: Test the Form
Visit your new contact page and try sending a test message. If you receive the email in your inbox, the setup is complete.
If not, check your spam folder or verify your site’s email settings with your hosting provider.
Step 6: Optional – Add Spam Protection
If you have the Akismet plugin installed and active, the tags already included in your form will help block spam.
If you don’t use Akismet, you can add a simple honeypot field for extra protection. Just add this line anywhere in your form:
[honeypot your-website]
This creates a hidden field that catches most spam bots automatically.
This form design is simple, clean, and works with almost any WordPress theme. It requires no coding experience and only a few minutes to set up. You can always adjust colors or font sizes later in your theme customizer.
With Contact Form 7, you now have an easy, reliable way for visitors to contact you directly from your website.