fbpx

How to Prevent Text Selection and Copy/Paste in WordPress

Many publishers who want to stop people from stealing their content may want to apply this. This basically just makes it a bit harder for people to copy text from your website.

In this article, we’ll show you how to easily prevent text selection and copy/paste in WordPress.

Why Prevent Text Selection and Copy/Paste on Your WordPress Site?

Many bloggers find that their content gets stolen and used without permission.

This can happen through automated content scraping. It can also happen if someone manually copies part or all of your content.

One way to make this more difficult is to prevent people from copying and pasting your text. You can do this by making it harder for them to select the text on your website.

Remember, tech savvy users can still view the source code or use the Inspect tool to copy anything they want. These techniques will also not stop people who are using auto-blogging tools to fetch the content using RSS.

Keeping this in mind, let’s take a look at a few ways to prevent text selection and copying in WordPress.

Method #1: Preventing Text Selection Using CSS

This method is simpler, and you’ll just need to add some custom CSS code to your WordPress theme. If you haven’t done this before, then take a look at our guide on adding custom CSS to your site before you begin.

First, you need to visit the Appearance » Customize page in WordPress admin area to launch the theme customizer.

Opening the theme customizer to add custom CSS

In theme customizer, you need to click on the Custom CSS tab from the left column.

Now, you will see a box to add custom CSS to your WordPress theme. Simply copy and paste the following CSS code into that box.

12345678* {-webkit-touch-callout: none; /* iOS Safari */-webkit-user-select: none; /* Safari */-khtml-user-select: none; /* Konqueror HTML */-moz-user-select: none; /* Old versions of Firefox */-ms-user-select: none; /* Internet Explorer/Edge */user-select: none; /* Non-prefixed version, currently supported by Chrome, Opera and Firefox */}

(Code source)

This is how the code will look when added.

Adding the CSS code to prevent text selection and copy/paste

Now, go ahead and try to select some of the text on your page in the live customizer. You will find that you cannot select it.

Don’t forget to click the ‘Publish’ button at the top of the screen to put your changes live for everyone.

Method #2: Preventing Text Selection Using a Plugin

For this method, we will be using a WordPress plugin that disables text selection and right-click. This would also protect images from being downloaded and reused.

First, you need to install and activate the WP Content Copy Protection plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, the plugin will work straight out of the box. Users will no longer be able to copy and paste text from your site. They also will not be able to right click or print your content.

If you want to change the plugin’s settings, it’s easy to do so. Simply go to the Copy Protection page in your WordPress admin. Here, you can choose to enable or disable protection for specific types of content.

The settings for the WP Content Copy Protection & No Right Click plugin

Make sure you click the Save Settings button after making any changes.

You can also change the message that will appear if someone tries to print your content. The message will display like this in the print preview and on the printout itself.

The default message that users will see if they try to print a protected page/post

Is it a Good Idea to Prevent Text Selection in WordPress?

While many new website owners want to stop people from copy/pasting content from their site, these techniques do not really prevent content theft.

Any slightly tech savvy user can easily open your website code source to copy any content that they want.

Also not everyone copying your text will be a content thief. For instance, some people may want to copy the title to share your post on social media.

This is why it’s not best practice to prevent text selection. We recommend you only use this method if you feel it’s truly needed for your site.

In most cases, it’s better to look for an alternative way to prevent content theft. If a site is re-publishing your content without permission, then you could find out who is hosting the website and send a DMCA takedown notice.

Leave a Reply