How To Protect Website Source Code In WordPress & PHP?

Hey, I will tell you today, How To Protect Website Source Code, Hide Source Code WordPress, How To Hide Source Code In PHP, & How To Hide Source Code From Public View, if you want to know, then keep reading this post.

Today I am going to tell you the tips to protect this website, you use these tips on your WordPress website, HTML website and PHP website. Because I am going to tell different tips for these three websites?

So, friends, without losing time, we quickly learn how to Protect Website Source Code in WordPress & PHP. And how they will work. And how to use them. Let’s get to know

How To Protect Website Source Code

Guys, if you have created such a website. Which no one can copy and cannot have a website like yours? Therefore, you want to close the source code of your website for public view. Even if the website is built anywhere, like WordPress, PHP and etc. It works on everyone.

1. How To Protect Website Source Code?

Friends, this method is very simple and simple. You can use any of your website whose source code you want to protect for public view. First of all, you have to put this code inside the head tag of your website’s index page ie Header page.

<body oncontextmenu="return false">

Note: With this code, you can hide the source code of any website for public view.

<!DOCTYPE html>
<title>Title Here!!!</tiel>
<body oncontextmenu="return false">

2. How To Hide Your Source Code WordPress?

Guys if your website is on WordPress. And looking for, How To Hide Your Source Code WordPress, you can use this code to hide your source code. And in you, this will only be Right Click Disable of Mouse. So how do we prototype with Code on a WordPress website? Let’s get to know.

First you login to your WordPress website dashboard. After that, after clicking on the Appearance button, click on the Theme Editor button. Or After clicking, open the file Header.php of the theme used in the WordPress website.

After opening, now you have to find <body> Tag. And this code that we have given. Copy and replace. And then you save it, and after saving, the Word Code of your WordPress website will be hidden for Public View. And Mouse’s Right Click will be disabled.

<body id="tie-body" oncontextmenu="return false" <?php body_class(); ?>>
How To Hide Your Source Code WordPress

Or Friends, how to use this code in WordPress website, you must see this screenshot for it.

3. Hide Source Code WordPress Plugin?

Guys if you have created your website WordPress, and you do not want to use this code. Or not doing it. And even then, you are looking for that, how to hide source code WordPress plugin, let us know. And Protect your WordPress website through Plugin.

First of all, log in to your WordPress website dashboard. And add a new plugin. The name of the plugin is WP Content Copy Protection & No Right Click. You can activate it. And this plugin looks like this.

Hide Source Code WordPress Plugin

After activating this plugin, you have to open its setting. And here is some sort of setting shown in this Graphics. And the Dummy Text is given in this setting if you want to change. So can.

And friends, in this way you can protect your WordPress website without just a plugin of a code.

4. How To Hide Source Code In PHP?

Friends, if you have made your website in HD again on PSP, then who can you use it? Through this court, you can easily protect your website. You have to paste this code in the <body> tag of your PHP website. And then saveā€¦

<body oncontextmenu="return false">

After that, I hope that your website will be Protected. But if it is not happening, then you can also use this code. Because if it does not happen, then it will definitely happen. You have to paste this code in the source code of your page, which you want to Protect, and you can add this code anywhere in the tag. Your website will definitely be protected.

<script type='text/javascript'>
 if (typeof document.onselectstart != "undefined") {
 document.onselectstart = new Function("return false");
 } else {
 document.onmousedown = new Function("return false");
 document.onmouseup = new Function("return false");

So I hope that now you will not search on google how to Protect Website Source Code because now you have protracted the website with WordPress or PHP. If this post is good, then share it with all your developer and blogger friends. Who wants to hide the source code of their website.

Note: By using this and the tips are given by us, if there is any damage to your website at any time, then we are not responsible for it, so you should use this code only after checking it.

And if you want to get information about us, that is, you want to know more about Oflox Digital Marketing Company. So you must watch this video of ours.

Or Friends, if you want to know more about Oflox Digital Marketing Company, then follow us on FacebookTwitter, and Instagram page And thank you very much for reading this post.

Add a Comment

Your email address will not be published. Required fields are marked *