Stop WordPress Spam Messages

Combat spam messages in WPForms on WordPress, consider these steps:

  1. Implement CAPTCHA: Enable CAPTCHA to validate that the form is being submitted by a human, not a spam bot.
  2. Utilize Honeypot Technique: Enable the honeypot technique, a hidden field that only bots will fill out, allowing you to detect and block spam submissions.
  3. Enable Form Submission Limits: Restrict the number of form submissions from a specific IP address within a defined timeframe to deter spam.
  4. Use Akismet Integration: Integrate Akismet, a spam filtering service, to identify and block spam submissions.
  5. Enable Email Confirmation: Set up email confirmation for form submissions, ensuring that only verified emails are accepted.
  6. Implement Time-based Restrictions: Restrict the frequency of form submissions from the same IP within a specific time frame to minimize spam.
  7. Customize Form Fields: Modify form fields to make them unique, making it harder for bots to autofill them.
  8. Review IP Blocking: Block suspicious IPs or IP ranges that consistently generate spam submissions.
  9. Regularly Update Plugins: Ensure WPForms and related plugins are up to date to benefit from the latest security features and improvements.
  10. Monitor Form Submissions: Regularly review form submissions to identify patterns of spam and adjust your spam prevention strategies accordingly.

Additionally you can use the code below that you will insert into a WordPress plugin for PHP code snippets.

/**
* Block domains inside the WPForms Paragraph Text
*/

function wpf_dev_prevent_domains_textarea( $field_id, $field_submit, $form_data ) {

if ( preg_match( '/www.|.com|.net|.org|http|https|.co.uk/', $field_submit ) ) {
wpforms()->get( 'process' )->errors[ $form_data[ 'id' ] ][ $field_id ] = esc_html__( 'URLs are not allowed to be submitted in this contact form.', 'plugin-domain' );
}
}

add_filter( 'wpforms_process_validate_textarea' , 'wpf_dev_prevent_domains_textarea', 10, 3 );

Stop WordPress Spam Messages Form Picture

Implementing a combination of these strategies should significantly reduce spam submissions in WPForms on your WordPress website.