Adding a contact form to WordPress without a plugin
How to use the free forms on a WordPress site, and when a plugin is the better choice.
The following areas are covered in this guide:
- The short answer
- Why use it without a plugin?
- Where the form's folders go
- Putting the form on a page
- If your theme changes how the form looks
- Caching, speed and security plugins
- Backups and WordPress updates
- When a plugin is the better choice
The short answer
Yes, the form works on WordPress sites, without a plugin. You upload the form's two folders next to your WordPress files, then paste the form into a page using a Custom HTML block. Messages are emailed straight to you, and nothing is added to your WordPress database.
You need to be able to upload files to your site (with FTP or your host's file manager), and your hosting needs PHP 8.2 or newer, which most WordPress hosting already has. Most WordPress.com plans don't let you upload files, so the form can't be used there.
Why use it without a plugin?
- Nothing to keep updating in WordPress. No plugin updates, no plugin security alerts, and nothing that can break when WordPress updates.
- Nothing to upgrade to. Every feature is free, including the form builder. There's no paid "Pro" version.
- Light. The form's files only load on the page the form is on, not on every page of your site.
- Private. Messages aren't stored in your database or sent to a form service, only to your inbox.
Where the form's folders go
Set the form up as in the quick set up guide: add your email details to fcf-config/fcf.settings.php. Then upload the two folders, fcf-assets and fcf-config, into the same folder as your wp-config.php file, side by side:
public_html/
fcf-assets/
fcf-config/
wp-admin/
wp-content/
wp-includes/
wp-config.php
WordPress leaves real files and folders alone, so the form's PHP file runs as normal. You don't need to change WordPress's .htaccess.
Don't put them in wp-content/uploads. Many hosts and security plugins stop PHP files running in that folder, and the form wouldn't be able to send.
Upload the .htaccess files in the folders too. Their names start with a dot, so some FTP programs hide them.
Putting the form on a page
- Open fcf.form.htm from the download and copy the two style sheet lines from its <head>, and everything between <!-- the lines below are needed --> and <!-- the lines above are needed -->.
- Start each of the five paths with a slash, so they work from any page (see below).
- In WordPress, edit your contact page, add a Custom HTML block where you want the form, and paste it all in, style sheet lines first.
- Save the page and test the form.
<link href="/fcf-assets/css/fcf.default.css?v=2026.2" rel="stylesheet"> <link href="/fcf-config/css/fcf.custom.css" rel="stylesheet"> <form ... action="/fcf-assets/fcf.process.php"> <script src="/fcf-assets/js/lang/fcf.en.js?v=2026.2"></script> <script src="/fcf-assets/js/fcf.form.js?v=2026.2"></script>
If WordPress is in a subfolder, for example yourdomain.com/blog, the folders go next to wp-config.php in that subfolder, so the paths start /blog/fcf-assets/... and /blog/fcf-config/... instead.
Note
The form needs its two <script> lines. On a normal WordPress site, Administrators and Editors can save them in a Custom HTML block. Authors and Contributors can't, and on a multisite network only the Super Admin can: WordPress removes the scripts when the page is saved, and the form won't send. If that happens, ask an Administrator (or the Super Admin) to add the form.
Keep the credit line ("Contact form by FreeContactForm") visible with the form, as set out in the licence, or buy an unbranding licence to remove it.
Want visitors sent to one of your WordPress pages after the form is sent? Put its address in THANK_YOU_PAGE in fcf.settings.php.
If your theme changes how the form looks
Some themes style every text box and button on the site, and their styles can win over the form's. You might see different borders, padding or button colours from the demo.
To fix it, add rules to fcf-config/css/fcf.custom.css that start with .fcf-form-wrap, which makes them stronger than the theme's. For example:
.fcf-form-wrap .fcf-input,
.fcf-form-wrap .fcf-textarea {
box-shadow: none;
margin: 0;
}
Most themes need nothing at all. The width of the form follows the space it's given, up to the width set in the form builder.
Caching, speed and security plugins
- Page caching is fine. The form sends its messages straight to its own PHP file, which isn't cached.
- Speed plugins that combine, minify or delay JavaScript can stop the form working. If the form shows but won't send, exclude /fcf-assets/js/ from those options.
- After upgrading the form, clear your caching plugin's cache and your CDN's (for example Cloudflare), or visitors can keep getting the old files.
- Security plugins and firewalls sometimes block messages sent to PHP files they don't know. If the form says it can't send, check the plugin's firewall log and allow /fcf-assets/fcf.process.php.
To find what's wrong, use the self-test page: see messages not arriving?
Backups and WordPress updates
WordPress updates don't touch the form's folders, so your form keeps working. But many backup plugins only back up wp-content and the database, so they won't include fcf-assets and fcf-config. Keep your own copy of fcf-config, especially fcf.settings.php, or add the folders to your backup plugin's settings if it lets you.
To upgrade the form, replace the fcf-assets folder and update the ?v= numbers in your Custom HTML block. The installation guide explains upgrading in full.
When a plugin is the better choice
This form suits most contact pages, but a WordPress plugin may suit you better if:
- you want messages saved in your WordPress dashboard as well as emailed
- the people who'll change the form can't upload files or edit settings, for example a client who only uses the WordPress editor
- you can't upload files to your site at all
Otherwise, the free form gives you a fast, private contact form with nothing extra to maintain in WordPress. Need different fields? Make your own with the form builder.
Something not working? See the help and FAQ page, or the installation guide for every setting.