Menu
Disclosure: ULTIDA's content is free & reader-supported. We may earn a commission if you click & buy through our links. Your support helps us create the best content & make a difference.
Themes

How To Disable Right Click In WordPress? (2 Ways)

how to disable right click in wordpress

Do you want to learn how to disable right click in WordPress?

You are probably want to block the right click on your website to protect your content, right?

But can it actually do any HARM to your content?

Is it actually a good idea?

There aren’t many websites out there that use this sort of protection, but it can be a viable solution to copyright infringement.

This post covers:

Pros & Cons Of Disabling Right-Click In WordPress

Pros

If you are a photographer, web designer, or an artist of any other sort, the thought of your content being stolen and reproduced without your knowledge can be frightening.

Disabling right-click WILL PREVENT the most blatant theft of your images or graphics that can be otherwise done by simply right-clicking on the image and clicking “Save image as…”.

Yes, just like that, and the image you worked for so hard is now on someone else’s computer.

They can then upload it to their social media, and you might never even know that someone else claimed the bragging rights for your work.

While that is annoying and a nuisance, it’s much worse if you are a professional and someone else is making money with the help of your art.

So, the main purpose of disabling the right-click is to protect your copyright.

But is that always a good idea?

For instance, 1x is a curated professional gallery of the best photographs worldwide, and they have used this feature for many years.

But, a few months ago, they reenabled the right-click.

Let’s take a look as to what might be the reason.

Cons

Disabling right-click seems like a simple and effective solution to copyright infringement.

But does it really solve the problem?

Disabling the right-click can cause accessibility issues and can upset your visitors.

Saving content from another website has many legitimate uses, and one of the main purposes of the internet has always been sharing your work with other users.

Also, there are many ways for users to GET AROUND protection methods.

For instance, one can take a screenshot of the content, save it to Photoshop and then extract it to a new file.

So, disabling the ability to right-click is not always good protection for images.

That is probably why the 1x gallery mentioned above recently removed it.

A BETTER way to protect your images is to ensure you upload thumbnails of limited size and not an image in full resolution.

Your website will also load faster (read better user experience), which is good for both your visitors and your position in the Google search engine. Speaking of speed, you may also be interested in reading how to choose a fast WordPress theme.

So, this kind of protection is better suited for the written word.

Even if users take a screenshot of it, they still have to rewrite the content, which takes a lot of time (and a good reason they may not do it in the first place).

How To Disable Right Click In WordPress

Now that we know when it makes sense to add copyright protection to our website, let’s take a look at how to do it.

1. Disable Right Click In WP With A Plugin

As always, the most obvious choice is to use a WordPress plugin.

Head over to Plugins > Add new in your WordPress dashboard and search for the WP Content Copy Protection plugin.

Simply install and activate the WordPress plugin, and you’re done!

Refresh the page on your website, and you will immediately notice that the right-click is no longer working.

And you won’t be able to select and copy text either.

Click on Copy Protection button in the left column of your WordPress dashboard to check the plugin’s settings.

disable right click with a wordpress plugin

The free version of the plugin only uses JavaScript to protect the posts and pages from being copied.

Note: We also have a complete guide on how to add custom Javascript to WordPress.

You can also decide whether you want protection only on the home page or on all content on your website.

The PRO version of the plugin will also protect your content with some CSS tricks in case a thief disables JavaScript in the browser settings.

Yup, you better be prepared because they’re sneaky.

2. Disable Right Click In WP Without A Plugin

This method is more complicated, and I only recommend it for experienced WordPress users with some basic coding knowledge.

Head to your WordPress dashboard and click Appearance > Theme file editor.

Now select and open the footer.php file and add the following code in the website’s footer section.

Find the </body> tag, then paste the code provided just above the closing of the body tag.

<script type=”text/javascript”>
jQuery(document).ready(function () {
//Disable cut copy paste
jQuery(‘body’).bind(‘cut copy paste’, function (e) {
e.preventDefault();
});
//Disable mouse right click
jQuery(“body”).on(“contextmenu”,function(e){
return false;
});
});
</script>

Save the file, and delete the browser cache before you refresh your website.

This code will prevent right-clicking on every page of your website. Plus, it will also protect the written content from being copied by an average user.

It is HIGHLY recommended that any changes to the theme’s files are done using a WordPress child theme.

This allows you to customize the theme without the risk of losing all your hard work when the theme is updated.

Note: You can also use a WordPress backup plugin for a quick website restore if something goes sideways.

5 Other Methods To Protect Your WordPress Content

Since disabling the right-click is not always as effective as we would like, let’s take a look at some other methods that can help you protect your precious content.

1. Copyright Notice

You should always have a copyright notice on your website.

This gives you a legal right over your content, which can be very important if you ever find yourself in a dispute over your content.

A copyright notice is a SHORT line of text that lets your visitors know that your work is protected by copyright law and is not to be copied.

It usually consists of 4 pieces of information:

  • The copyright symbol – ©
  • A date
  • Author’s or website’s name
  • A statement of rights (All rights reserved)

The best place for the copyright notice is in the footer so that it’s visible on every page of your website.

You don’t necessarily need to have a separate page explaining your copyright, but many sites choose to do so if the copyright for their sites is more complicated than usual.

I still recommend it, though.

2. Watermark Images & Videos

A great way to protect your images & videos is to add a watermark with your signature on them.

You can use an online tool like MyPhotoSign to create a personalized signature that not only protects your images but also looks great.

Artist’s signature can also increase the recognizability and engagement of your work, so it’s important that you add it.

3. Password Protect Your Content

If you really want to protect your content from unsolicited views and copying, then password protection is the best option for you.

Password Protect WordPress plugin offers a powerful all-in-one solution to secure your website with a password(s).

In MOST cases, the protection won’t be set over the whole website but only the select content.

The plugin has the option to password-protect WordPress categories, WooCommerce products, specific posts, or your entire website.

The choice is yours.

Please note that the plugin doesn’t protect images, videos, and other attachments.

But these are ONLY accessible if a user has a direct link, which you send to the user you want to give them access to, so no one else will see it.

The plugin’s lite version features:

  • Password protect WordPress pages, categories, and posts by user roles
  • Use of reCAPTCHA to prevent hacking
  • Password protect the entire website

You can also integrate the plugin into all the major WordPress page builders like Elementor, Beaver Builder, and WPBakery.

It even works with the Divi Builder by using a built-in module.

4. Use Copysentry

Copysentry is the most advanced plagiarism protection tool that monitors (on a weekly or daily basis) the entire internet for copies of your content and sends you an email as soon as they appear.

They offer an introductory signup deal where you get the first month for free.

The downside of this method is that it’s PRETTY expensive, so use it wisely.

Copysentry standard package (check weekly) costs $4.95/month for up to 10 pages and $0.25/month for each additional page.

Copysentry professional package (check daily) costs $19.95/month for up to 10 pages and $1.00/month for each additional page.

5. Use A Membership Plugin

The last option I will cover in today’s tutorial is the Paid Membership PRO plugin.

This is the best solution for a website with premium content, online courses, WordPress theme clubs, web stores with limited edition products, and much more.

Simply SET which part of your website is only accessible with membership and set different access levels.

membership pro plugin to protect wordpress content

Users can now select their membership level and start using your premium services or products immediately after the purchase.

Note: We also have a complete list of the best, tested WordPress membership plugins in case you’d also like to check alternatives.

Wrapping Up

Content protection is a very hard task, and there is no perfect solution.

A COMBINATION of the described methods will work the best in most cases, but you will just have to accept that some of your content will end up being used by others.

Password protection and membership will do a great job protecting your content. However, this also means it won’t be accessible to most of your visitors.

And it’s up to you to decide if this is really the way you want to present your content.

FAQs About Disabling Right Click In WordPress

Why disable right-click in WordPress?

Disabling right-click in WordPress is often used as a deterrent against unauthorized copying or downloading of content, such as images, text, or code. It aims to protect intellectual property by making it slightly more difficult for users to save or replicate website materials directly from the browser.

How can I disable right-click on my WordPress site?

Right-click functionality can be disabled on a WordPress site using plugins designed for this purpose. Plugins like “WP Content Copy Protection” can be installed and activated from the WordPress plugin repository. Alternatively, custom JavaScript code can be added to the site’s theme files to prevent right-click actions.

Does disabling right-click affect the WordPress site’s user experience?

Yes, disabling right-click can impact the user experience by restricting standard browser functionality. Some users may find it inconvenient or frustrating, especially if they are accustomed to right-clicking for legitimate purposes, such as opening links in new tabs or accessing browser tools.

Can disabling right-click in WordPress completely prevent content theft?

Disabling right-click is a basic deterrent and cannot completely prevent content theft. Determined individuals can bypass this protection through various means, such as using browser developer tools, taking screenshots, or accessing site files directly.

Are there any alternatives to disabling right-click for protecting content in WordPress?

Instead of disabling right-click, consider using other strategies for content protection, such as watermarking images, using copyright notices, enabling hotlink protection to prevent direct file linking, or employing more sophisticated digital rights management (DRM) solutions.

::

Note: This article was originally published on October 21, 2022. But our team regularly reviews it and updates it with necessary improvements for accuracy.

About Author

Ales has been in love with computers ever since he got Amiga 500 almost 30 years ago. He earned his bachelor’s degree in Computer science from Ljubljana University, Slovenia. In 2010 he co-founded PremiumCoding, a website that makes awesome WordPress themes that are also for sale on ThemeForest. In the past few years, he focused mainly on combining web design, code and photography into a seamless experience.