How to stop spam form submissions in WordPress
By Aleksan Aharonyan ·
A post submission form that anyone can use will collect spam within days of going live, and a captcha on its own will not stop it. The reliable setup is a stack: hold every submission for review, block automated scripts with a captcha, decide whether submitters need an account, check the content itself, and clean the queue on a schedule. Each layer catches what the one before it misses.
Key takeaways
- Set the form’s post status to Pending before you announce the form anywhere, so no submission reaches the public site without your approval.
- A captcha stops bots that cannot solve the challenge, but it does not stop a person who is paid to post junk, so keep review in place behind it.
- Requiring a login raises the cost of every submission and gives you an account you can block, at the price of contributors who will not register.
- Check the queue on a fixed day each week and feed what you see back into your rules, or the same spam will keep arriving.
Why spam slips through a post submission form
Post submission spam gets through because a public form is an open write endpoint: scripts send data to it without loading the page, and people submit junk by hand for a link or a mention. Your form’s own settings decide how much of that reaches the public site.
There are three kinds of junk, and they need different answers.
- Automated. A script posts to the form, ignores the page, and often fills every field with the same text or a random string. A captcha that is checked on the server blocks most of these.
- Manual. A person writes a plausible post with a link in it. No captcha stops this, because the person is happy to tick a box.
- Repetitive. One account, one phrasing, many posts. Easy to catch if you read the queue, expensive if you do not.
What makes all three worse is publishing by default. A spam post that publishes can be indexed, pushed into feeds, and emailed to subscribers before you ever see it. The second problem is your own inbox: if fifty junk submissions arrive in a day, you stop opening the notification email, and the one real submission gets lost with the rest.
Step 1: Start with Pending review so nothing publishes unseen
Setting the form’s post status to Pending is the cheapest defense you have: the submission is stored, you are notified, and nothing appears on the site until a person approves it. It costs nothing and it never fails open.
- Open the form and find its post submit settings. Set the post status to Pending rather than Publish. In Front User Submit, a free plugin for frontend post submission and guest posting forms, this is a per-form setting and the post submit settings page shows where it sits next to the redirect and the success message.
- Leave a “Save Draft” button visible to authors if your form offers one. A draft waits for the writer, not for you, so it keeps the review queue shorter.
- Turn on the admin email notification for each form and point it at an address you actually read, not the site admin address you never open.
- Check your WordPress roles. A Contributor can submit a post for review but cannot publish it, which matches Pending review exactly; a Subscriber cannot write posts in wp-admin, though a front-end form can still take their submissions. Do not move new accounts to Author or above just to let them post, because those roles can publish.
- Decide how often you review. Twice a day for a busy form, once a week for a quiet one, and put it in the calendar rather than trusting memory.
How to check it worked: log out, submit a test post that contains a link, then look at the Posts list in wp-admin and at the author’s own dashboard if you gave them one. The test post should sit in Pending, be invisible to anyone without edit rights, and produce one admin email.
Step 2: Add a captcha: reCAPTCHA v2 or hCaptcha
A captcha on a post submission form blocks the scripts that fill and submit the form without a browser, and does nothing against a person typing junk. Add it as a second layer, not as the only one.
- Pick Google reCAPTCHA v2, the familiar “I’m not a robot” checkbox, or hCaptcha, which does the same job through a different provider. Both give you a pair of keys: a site key that goes into the form and a secret key that stays on the server.
- Register the site’s domain with the provider and copy both keys. Register your staging domain too, or the check will fail there and you will not be able to test safely.
- Add the captcha field to the form and paste the keys into its settings. Put it last, just above the submit button, so the check happens after the person has already decided to submit.
- Test in a private window while logged out, once solving the challenge and once failing it on purpose.
- Watch the notification email for both attempts. The failed attempt should create no post and send no email.
In Front User Submit both captcha fields are Pro, and the reCAPTCHA field docs cover where the keys go; the plans list what Professional and Business include, and Professional comes with a three-day trial.
A captcha does not read the post. A submission that ticks the box and contains forty links to an online pharmacy still arrives, so treat the captcha as a bot filter and keep the review step behind it. Re-test it after any update to the form, the theme, or WordPress itself.
How to check it worked: compare a day of submissions before and after. Automated junk built from random strings should drop sharply. If it does not, the field is probably not validating, so test again from a logged-out window.
Step 3: Require a login for the form (and what guests see instead)
Requiring an account turns an anonymous write endpoint into one tied to a user you can demote or delete, at the cost of every contributor who will not register. For a site taking occasional guest posts that trade is usually worth it; for a news tip form or a directory it often is not.
- Decide the rule per form, not per site. A “write for us” form and a competition entry form can have different requirements.
- Write the restricted message yourself. When login is required, a logged-out visitor does not see the fields, only a short note, and the default wording loses people. Say what to do, and put the login and registration links right next to it.
- Put a login form and a registration form on the same page as the submission form, and redirect back to the form after login so nobody has to find it again.
- Set the default role for new accounts to Subscriber or Contributor in your WordPress settings, and check that setting again after adding any membership plugin. New accounts should never land in a role that can publish.
- Tell new users how to get a password. Several front-end registration forms create the account without emailing a password, so link them to the WordPress “Lost your password?” page from the login screen.
An account also makes cleanup possible. A logged-in spammer leaves a user record, and deleting that user gives you the option to delete their posts with it. There is nothing to delete when the posts came from nobody.
If you decide you must accept anonymous posts, keep Pending review and add either a captcha plus content moderation or a manual read. An anonymous form with automatic publishing is an open invitation.
How to check it worked: open the form page in a private window. You should see your message and the two links, not the fields. Then register a test account and confirm in wp-admin that it got the role you intended.
Step 4: Use AI moderation to catch what the captcha misses
Captcha and login decide who may submit; moderation decides what gets published. AI moderation reads a submission against rules you write in plain language and holds anything that looks like spam or abuse for a person to check.
It earns its place on forms where trusted members publish directly. If every submission already waits in Pending, you are reading everything anyway, and moderation mostly saves you time rather than catching anything new.
- Turn moderation on for the forms that can publish without you.
- Connect a provider and an API key. AI features run on your own key and you pay the provider directly, so the cost follows your submission volume.
- Write the rules as sentences you would say out loud: “No links to casinos or pharmacies. Posts must be about this town. No text copied from other sites.” Vague rules produce vague results.
- Choose what happens to a flagged post. Saving it as Pending puts it in your review queue; saving it as Draft keeps it out of that queue as an unfinished post. Either way, the post’s edit screen shows the AI’s reason. Keep in mind that if the provider is unavailable, the post is saved as usual, so the review step still matters.
- Read the flags for the first couple of weeks and adjust. Too strict and you lose good contributors; too loose and you are reading the whole queue again.
In Front User Submit, AI moderation is a Pro feature that checks posts which would publish right away and saves flagged ones as Pending or Draft; the AI moderation docs cover the rules and the provider key.
WordPress’s own blocked-words list, under Discussion settings, filters comments and does not touch post submissions, so it cannot do this job for you.
How to check it worked: submit a test post containing an obvious spam phrase and a link, then submit a clean one. The first should not publish; the second should behave exactly as it did before.
Step 5: A cleanup routine for the spam that still arrives
Some spam always gets through, and the answer is a short weekly routine rather than another rebuild of the form. Ten minutes keeps the queue usable.
- Open the Pending list, newest first, and read titles only. Most junk gives itself away in the title.
- Check the count, then trash in bulk and empty the trash. Confirm the number before a select-all so you do not lose a real post.
- For a repeat account, change the role to Subscriber, or delete the user and choose to delete their content. Deleting the account is the step that stops the next post.
- For repeat sources such as the same IP range or email domain, block at the server or with a security plugin. The submission form is not the place for network-level blocking.
- Add the phrases you keep seeing to your moderation rules or to a written checklist, so the next reviewer recognizes them.
- After every update to WordPress, the theme, or the form plugin, run the private-window test again: one clean submission and one junk submission.
If a spam post ever appears published, check the form’s post status first, then check whether the submission came from an account with publishing rights.
How to check it worked: the queue takes you under ten minutes, the notification email carries more real submissions than junk, and a search on your own site for the spam phrase returns nothing.
FAQ
Does a captcha stop all spam form submissions?
No. A captcha stops automated scripts that cannot run a browser or solve the challenge, which is most of the random-string junk. A person can tick the box and post a link-filled article anyway, so keep review, a login requirement or content moderation behind the captcha.
Should new submissions be Pending or Draft?
Pending if you want to see each submission with its author and approve it in one click. Draft if the author should finish the post before you look at it. Pending is the better default for a public form because every submission lands in one queue and cannot publish by accident.
Do I have to require an account to stop spam?
No, but an account requirement is the strongest of the cheap layers: it makes each submission cost something and gives you a user to demote or delete. If you accept anonymous posts, keep Pending review, add a captcha, and expect to read the queue more often.