WP Anti-Clickjack


WP Anti-Clickjack is a powerful security plugin that helps prevent your WordPress site from being vulnerable to clickjacking attacks. Clickjacking is a malicious technique where an attacker tricks users into clicking on a concealed link or button by overlaying it on your legitimate website.

This plugin implements two key defense mechanisms:

  1. X-Frame-Options Header: The plugin adds the X-Frame-Options: SAMEORIGIN HTTP header to your site’s responses. This header instructs web browsers to prevent other websites from embedding your site within an iframe, effectively blocking clickjacking attempts.

  2. OWASP’s Legacy Browser Frame Breaking Script: The plugin includes a modified version of OWASP’s legacy browser frame breaking script. This script prevents other sites from putting your site in an iframe, even in browsers that don’t support the X-Frame-Options header. The script is optimized to work seamlessly in browsers with and without JavaScript enabled.

By combining these two security measures, WP Anti-Clickjack provides comprehensive protection against clickjacking attacks, ensuring the safety and integrity of your WordPress site.

For more information about clickjacking defense techniques, refer to the OWASP Clickjacking Defense Cheat Sheet.


  • Adds the X-Frame-Options: SAMEORIGIN HTTP header to prevent clickjacking
  • Includes a modified version of OWASP’s legacy browser frame breaking script
  • Compatible with popular page builders and editors like Elementor, Divi, WPBakery, and more
  • Provides filters to disable the anti-clickjacking measures when needed
  • Easy to install and configure
  • Regularly updated and tested with the latest WordPress versions

Additional Details

If you need to disable the clickjacking JavaScript on a specific page, you can use the following filter in your theme’s functions.php file:

add_filter('wp_anti_clickjack', '__return_false');

To disable the clickjacking X-Frame-Options HTTP header, use this filter in your theme’s functions.php file:

add_filter('wp_anti_clickjack_x_frame_options_header', '__return_false');


  1. Download the plugin from the WordPress.org repository or your WordPress admin dashboard.
  2. Upload the plugin files to the /wp-content/plugins/wp-anti-clickjack directory, or install the plugin through the WordPress admin interface.
  3. Activate the plugin through the ‘Plugins’ screen in your WordPress admin.
  4. The plugin will automatically add the necessary anti-clickjacking measures to your site.


Does this plugin affect my site’s performance?

No, WP Anti-Clickjack is designed to have minimal impact on your site’s performance. The anti-clickjacking measures are applied efficiently without causing any significant overhead.

Is this plugin compatible with page builders and editors?

Yes, WP Anti-Clickjack is compatible with popular page builders and editors such as Elementor, Divi, WPBakery, Thrive Architect, and more. If you encounter any compatibility issues, please contact me for assistance.

Can I customize the anti-clickjacking behavior?

Yes, the plugin provides filters that allow you to disable the clickjacking JavaScript and the X-Frame-Options header when needed. You can use these filters in your theme’s functions.php file to fine-tune the plugin’s behavior.


14 di Setembar dal 2020 1 reply
Someone signed up for our affiliate program and started replacing our domain name with their domain names, using domain masking. This plugin stopped them dead in their tracks. Now when you key in any of their domains, you get a blank page. Perfect! Thanks for this fabulous plugin.
Read all 2 reviews

Contributors & Developers

“WP Anti-Clickjack” is open source software. The following people have contributed to this plugin.


Translate “WP Anti-Clickjack” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Tested up to WordPress 6.5


  • Bug fixes for same origin requests


  • Tested up to WordPress 6.3
  • Bug fix for Elementor Pro site editor


  • Tested up to WordPress 6.2
  • PHP warning bug fix


  • Added support for Avada builder


  • Tested up to WordPress 6.1


  • Tested up to WordPress 6.0
  • Bug fix when using the WP customizer and editing widgets


  • Added support for Divi builder


  • Tested up to WordPress 5.9


  • Added HTTP header X-Frame-Options: SAMEORIGIN to further prevent clickjacking


  • Tested up to WordPress 5.8


  • Tested up to WordPress 5.7


  • Support for Cornerstone Page Builder


  • Support for WPBakery Page Builder


  • Tested up to WordPress 5.6


  • Added filter to disable the anti-clickjack script when needed
  • Tested up to WordPress 5.5


  • Increase WordPress supported version to 5.4


  • Increase WordPress supported version to 5.3


  • Bug fix for PHP warning


  • Increase WordPress supported version to 5.2.2


  • Bug fix when updating plugins/themes
  • Support for Thrive editor


  • Tested up to 4.8.9 and fixed conflicts with Elementor (if you are having an issue with a specific page builder please contact me)


  • Tested up to 4.8.0


  • Tweaked to add anti-clickjacking script to the admin pages


  • Tested up to 4.7.2


  • Bug fix causing Customizer.php to refresh constantly


  • Initial Release