In this guide
1. Keep form plugins updated
Form plugins are popular and complex, which makes them frequent targets. Keep them updated, remove form plugins you no longer use, and check them against vulnerability alerts. My security plugin comparison covers alert services.
2. Stop spam with layers, not one big wall
- Honeypot fields, hidden fields that only bots fill in. Most form plugins offer them.
- A bot check, such as Cloudflare Turnstile or reCAPTCHA, ideally the invisible or privacy-friendly kind.
- Rate limiting: a few submissions per minute per visitor is plenty.
- Content filtering: Akismet or similar services catch typical spam.
3. Don’t let your form send email to anyone
- Turn off “send a copy to the sender” for anonymous visitors.
- Never let a visitor choose the recipient address.
- Send WordPress email through a proper SMTP or email service, with SPF, DKIM and DMARC set up.
Otherwise spammers can use your form to send spam in your name. See WordPress sending spam emails.
4. Be very careful with file uploads
A form that accepts files is the riskiest kind:
- allow only the file types you need (for example PDF and JPG), never PHP, HTML or SVG from strangers;
- limit file size;
- store uploads outside the public folder, or in a folder where PHP can’t run;
- scan uploaded files if your form plugin supports it.
More in secure WordPress file uploads.
5. Protect the data you collect
- Store only what you need, and delete old entries regularly.
- Make sure form entries aren’t publicly accessible (no directory listing, no public export files).
- Use HTTPS everywhere, so form data is encrypted in transit.
From my cleanup work: form problems I see most often are not hacks but abuse: a form sending thousands of “copy to sender” emails until the host suspends email for the whole account. The second most common is a forgotten form plugin with an upload feature and a known vulnerability. Both are easy to prevent.