On many websites, you might have noticed that the content cannot be copied or selected. Even when you right-click, options like copy, cut, or paste do not appear. In this tutorial, we will learn how to disable copy paste in WordPress easily without using any plugin.
Let’s get started.
Step 1: Login to Your WordPress Admin Panel
First, log in to your WordPress dashboard with your admin credentials.
Step 2: Go to Theme File Editor
From the left sidebar, click on Appearance → Theme File Editor.

Step 3: Open the functions.php File
On the right sidebar, click on the functions.php file of your active theme.

Step 4: Add the Code
Scroll to the very bottom of the file and paste the following code. Finally, click on Update File.
/**
* Disable Right Click, Copy, Cut & Paste on Frontend
*/
function nahian_disable_copy_paste() {
?>
<script>
document.addEventListener("DOMContentLoaded", function() {
// Blocked events list
["contextmenu", "copy", "cut", "paste"].forEach(function(evt) {
document.addEventListener(evt, function(e) {
e.preventDefault();
});
});
});
</script>
<?php
}
// Hook into wp_head so that script loads on every frontend page
add_action( 'wp_head', 'nahian_disable_copy_paste');

Step 5: Done!
That’s it. Now, no one will be able to copy or right-click on your website content.
Important Note
Before making any changes, it is always recommended to take a backup of your theme to avoid unwanted issues.
✅ With this simple method, you have successfully learned how to disable copy paste in WordPress and protect your valuable content from being copied.
