Are you sure you want to do this? Please try again.

Sometimes, WordPress shows an error like:

Are you sure you want to do this?

Please try again.

This if often caused by memory limitations (script runs out of memory due to multiple plugins and complex theme installed on site).

To fix this memory limits need to be increased from the default of 40M. Usually 128M fixes most setups, but 256M can be used if more is required for certain operations.  This can be done from wp-config.php :

define( 'WP_MEMORY_LIMIT', '128M' );

A plugin like WP Config File Editor can be used.

That doesn’t work? Error can also be caused by bad plugin and/or theme code that generates memory usage loops.
Disabling plugins and switching to a standard theme will fix the issue in this case. Then plugins/theme can be reactivated one by one to identify which one/combination is causing the issue.

 

Top Plugins to Optimize and Secure WordPress

Speed Up and Secure

  1. WordFence
    Enable firewall, periodic scans, failed login block, secure passwords.
  2. WP Super Cache
    Speed up delivery of static content and pages: configure it for visitors to prevent overload by bots/crawlers.
  3. Use Google Libraries
    Load JS from CDN. Reduce load.
  4. WPS Hide Login
    Protect from brute login.
  5. Robots.txt File
    Edit the robots.txt file.
  6. Really Simple SSL
    Redirects pages to HTTPS (SSL required).
  7. Easy WP SMTP
    Use an account to send emails with necessary verifications to reduce spam filtering and lost emails.

Troubleshooting Tools

  1. P3 Plugin Performance Profiler
  2. Server IP & Memory Usage Display

Configuration

  • robots.txt

    User-agent: *
    Crawl-delay: 90
    Disallow: /wp-admin/
    Disallow: /wp-includes/
    Disallow: /streams/
    Disallow: /wp-login.php
    Disallow: /wp*

    User-agent: MJ12bot
    Disallow: /