How to Add a HubSpot Form to a WordPress Site (Step by Step)

A contact form is one of the most useful things on a business website, and a HubSpot form does more than send an email. Every submission can create a contact in your CRM, so you can follow up, track leads and send emails from one place.
This guide shows you how to add a HubSpot form to WordPress in four ways, how to choose the right one, how to check that leads reach HubSpot and how to fix common problems. If you don’t have a contact page yet, see our later guide on creating a contact page and form.
Disclosure: If you buy through links on this site, we may earn a commission at no extra cost to you. Add this line only if you use affiliate links.
How we put this guide together: These steps are based on HubSpot’s help pages and published tutorials, checked in October 2026. HubSpot and WordPress change their menus often, so your screen may look different. We haven’t hands-on tested every method here.
Before You Start
You’ll need:
- A HubSpot account. The free CRM works for basic forms, but check which features your plan includes.
- A WordPress site where you can install plugins and edit pages
- Admin access to both
- A form already created in HubSpot, or the plan to create one
Also decide what the form will do. A simple contact form needs name, email and a message. Keep it short, because fewer fields usually means more submissions.
Which Method Should You Use?
| Method | Difficulty | Best for |
|---|---|---|
| 1. Official HubSpot plugin, shortcode | Easy | Most beginners |
| 2. Official plugin, HubSpot Form block | Easy | Block editor users |
| 3. Embed code in a Custom HTML block | Medium | No plugin, or one-off forms |
| 4. WPForms with the HubSpot addon | Medium | Users who prefer WPForms, needs a premium plan |
Start with Method 1 or 2 unless you have a reason not to.
Method 1: Add a Form Using the HubSpot Plugin (Shortcode)
Step 1: Install the HubSpot plugin
- In WordPress, go to Plugins > Add New.
- Search for HubSpot, and pick the official plugin by HubSpot.
- Click Install Now, then Activate.
If you’re not sure which plugins a new site needs, see our list of essential WordPress plugins for new sites.
Step 2: Connect your HubSpot account
Follow the setup prompts to sign in or create a HubSpot account and connect it to your site.
Step 3: Open your forms
In the WordPress sidebar, go to HubSpot > Forms.
Step 4: Create or choose a form
Hover over a form and click Embed, or click Create form to build a new one.
Step 5: Copy the shortcode
Click WordPress short code, then copy it.
Step 6: Paste it into your page
- Open the WordPress page or post where you want the form.
- Add a Shortcode block (or paste it in the classic editor).
- Paste the shortcode.
- Click Publish or Update.
Method 2: Use the HubSpot Form Block
If you use the block editor, you can skip the shortcode.
- Open the page or post you want to edit.
- Click the + icon to add a block.
- Search for HubSpot Form and click it.
- In the block, choose an existing form or create a new one.
- Publish the page.
This is the easiest method for most people using the modern WordPress editor.
Method 3: Paste the Embed Code (No Plugin Needed)
Use this if you don’t want to use the plugin.
- In HubSpot, go to your Forms area (it may be under Marketing > Lead Capture > Forms).
- Find your form, click Actions, then Share (or Embed).
- Copy the embed code.
- In WordPress, edit the page and add a Custom HTML block.
- Paste the code and publish.
Warnings:
- WordPress may alter embed code, especially in some editors, which can stop the form from working. If that happens, use the plugin method.
- If you use a recent block editor that removes inline JavaScript, older “legacy” HubSpot forms may need an extra plugin such as Inline JS Block for Gutenberg, according to HubSpot’s help.
- To track form activity, the HubSpot tracking code must be installed on your site. The official plugin handles this for you.
Method 4: Connect WPForms to HubSpot
If you already use WPForms, you can send its entries to HubSpot.
- Install and activate WPForms (the HubSpot addon needs a premium plan).
- Install the HubSpot addon inside WPForms.
- Create or open a form in WPForms.
- Go to the form’s Marketing settings and connect your HubSpot account.
- Map your form fields to HubSpot properties, such as name and email.
- Embed the WPForms form on your page using the block or shortcode.
This method gives you WPForms’ design tools, with entries going into HubSpot.
Add Your Domain and Check Tracking
To keep your CRM clean and make sure submissions are recorded:
- In HubSpot, open your tracking and analytics settings.
- Add your website’s domain to the list of tracked domains.
- Check that the HubSpot tracking code is installed on your site (the plugin does this automatically).
Test Your Form
Never publish a form without testing it.
- Open the page in a private browser window.
- Submit the form with a test email address.
- Check HubSpot: the new contact should appear in your CRM, with the form submission recorded.
- Check that any notification email reaches you.
- Test on mobile and desktop.
- Test an error case, such as leaving a required field empty.
You can also view submissions inside WordPress under HubSpot > Forms.
Common Problems and Fixes
The form doesn’t appear.
Clear your page and browser cache, and check that the shortcode or block is correct. If you pasted embed code, try the plugin method instead.
The embed code looks broken.
WordPress may have altered it. Use the plugin or the HubSpot Form block.
Submissions don’t show in HubSpot.
Check that your account is connected, that the right form is selected and that your domain is allowed in HubSpot’s tracking settings.
The form works but visits aren’t tracked.
The tracking code may be missing. The official plugin installs it, or you can add it manually.
An ad blocker hides the form.
Some browsers or extensions block scripts. Test in another browser, and consider a backup contact option.
The form looks wrong on your theme.
Adjust styling in HubSpot’s form settings, or use your theme’s custom CSS carefully.
A caching plugin shows an old version.
Clear the cache after you change the form.
Tips for a Better Form
- Ask for only what you need. Name, email and message are often enough.
- Write a clear button label, such as “Send message” or “Get my quote”.
- Add a short thank-you message or redirect to a confirmation page.
- Set up an email notification so you don’t miss leads.
- Add a privacy notice and consent options if you collect personal data. Our later guide on legal pages covers privacy policies.
- Place the form where visitors expect it, such as your Contact page.
- Review submissions regularly and follow up quickly.
Frequently Asked Questions
Is the HubSpot WordPress plugin free?
The plugin is free, and HubSpot’s free tools can handle basic forms, but features depend on your HubSpot plan. Check what your account includes.
Do I need the plugin to add a HubSpot form?
No. You can paste embed code into a Custom HTML block, but the plugin is more reliable and sets up tracking automatically.
Why does my embedded form look broken?
WordPress can alter embed code. Use the plugin or the HubSpot Form block, or follow HubSpot’s guidance on inline scripts.
How do I see form submissions?
Check HubSpot > Forms in WordPress or open the form’s submissions and contacts in your HubSpot account.
Can I use HubSpot forms with Elementor?
Yes. You can paste the embed code into an HTML widget in Elementor, or use the shortcode.
Can I use WPForms instead of HubSpot forms?
Yes, with the HubSpot addon, which requires a premium WPForms plan. Entries can then go into HubSpot.
Do HubSpot forms affect my site speed?
They load extra scripts, which can add some weight. Use only the forms you need and test your page speed afterward.
Conclusion
To add a HubSpot form to WordPress, install the official HubSpot plugin, connect your account, then add your form with the HubSpot Form block or a shortcode. Use embed code only if you can’t use the plugin, and test every form before you publish. A short form, a clear button and quick follow-up will do more for your leads than any technical trick.



