WP Manifestindependent plugin directory
manifest / security / content-guard

ContentGuard

Content Guard helps protect your site contents

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/abhilashsahoo/content-guard/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin that helps protect your site content from copying, right-click, text selection, and other common content theft methods. Configure protection per role, page, post, URL pattern, or device.

Features

  • General protection

    • Disable right-click
    • Disable text selection
    • Disable copy shortcut (Ctrl+C)
    • Disable print screen & screen capture detection
    • Disable drag and drop
    • Protect images (no right-click/drag on images)
    • Disable view source
    • Disable developer tools
    • Disable clipboard access
    • Disable save page
    • Disable WebRTC
    • Disable print
    • Disable reader mode
  • Exclusions

    • Exclude by user role (e.g. Administrators, Editors)
    • Exclude specific pages or posts (or “Exclude from all”)
    • Exclude by URL patterns with wildcards (e.g. /shop/*, /2024/*)
    • Exclude by device (Desktop, Tablet, Mobile)
  • Advanced

    • Block custom keyboard combinations (e.g. ctrl+r, ctrl+shift+i)
  • Notification

    • Optional alert message when a blocked action is attempted (customizable text)

Requirements

  • WordPress 5.0 or higher
  • PHP 7.4 or higher

How to Download and Install

Step 1: Download the plugin

Option A – Download as ZIP from GitHub

  1. Go to the ContentGuard repository on GitHub.
  2. Click the green Code button, then Download ZIP.
  3. Save the ZIP file and extract it on your computer.
  4. You should see a folder named contentguard (or contentguard-main if you downloaded the default branch; rename it to contentguard if needed).

Option B – Clone with Git

git clone https://github.com/your-username/contentguard.git

This creates a contentguard folder in your current directory.

(Replace your-username with the actual GitHub username or organization.)


Step 2: Install in WordPress

Option A – Upload via WordPress admin

  1. Log in to your WordPress site as an administrator.
  2. Go to Plugins → Add New.
  3. Click Upload Plugin, then Choose File and select the ZIP file of the plugin (create a ZIP of the contentguard folder if you cloned or extracted it).
  4. Click Install Now.
  5. After installation, click Activate Plugin.

Option B – Copy files via FTP or file manager

  1. Upload the entire contentguard folder to your WordPress wp-content/plugins/ directory.
    • Example path: public_html/wp-content/plugins/contentguard/
    • The main file contentguard.php must be inside wp-content/plugins/contentguard/contentguard.php.
  2. In WordPress admin, go to Plugins.
  3. Find ContentGuard in the list and click Activate.

Step 3: Configure

  1. In the WordPress admin sidebar, click ContentGuard (shield icon).
  2. Adjust General, Exclusions, Advanced, and Notification Alert as needed.
  3. Click Save Changes.

Configuration

After activation, go to ContentGuard in the WordPress admin.

  • General – Turn each protection feature on or off.
  • Exclusions – Choose roles, pages, posts, URL patterns, and devices to exclude from protection.
  • Advanced – Add keyboard combinations to block (e.g. ctrl+r).
  • Notification Alert – Enable the alert and set the message shown when a blocked action is attempted.

URL pattern examples

In Exclusions → Exclude URL Patterns (one pattern per line, * as wildcard):

Pattern Effect
/2024/07/03/hello-world/ That specific post
/2024/07/* All posts in July 2024
/2024/* All posts in 2024
/product/* URLs under /product/
/shop/* e.g. WooCommerce shop URLs

File structure

contentguard/
├── contentguard.php          # Main plugin file
├── includes/
│   ├── admin-settings.php    # Admin UI and settings
│   └── content-protection.php # Front-end protection logic
├── assets/
│   ├── css/
│   │   └── admin.css
│   └── js/
│       ├── admin.js
│       ├── contentguard.js
│       └── device-detection.js
├── README.md
├── LICENSE
└── .gitignore

Contributing

Contributions are welcome.

  1. Fork the repository.
  2. Create a branch: git checkout -b feature/your-feature.
  3. Commit your changes: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/your-feature.
  5. Open a Pull Request.

License

ContentGuard is open source software licensed under the GPL v2 or later.
Compatible with WordPress and the WordPress plugin directory guidelines.

Author

Abhilash Sahoo


If this plugin is useful to you, consider giving it a star on GitHub.