innocode-digital/wp-force-non-public

Programmatically discourages search engines from indexing the site.

Installs: 5 805

Dependents: 2

Suggesters: 0

Security: 0

Stars: 1

Watchers: 11

Forks: 0

Type:wordpress-muplugin

1.0.0 2021-11-09 16:39 UTC

This package is auto-updated.

Last update: 2024-04-09 22:05:20 UTC


README

Description

Programmatically discourages search engines from indexing the site.

Install

  • Preferable way is to use Composer:

    composer require innocode-digital/wp-force-non-public
    

    By default, it will be installed as Must Use Plugin. It's possible to control with extra.installer-paths in composer.json.

  • Alternate way is to clone this repo to wp-content/mu-plugins/ or wp-content/plugins/:

    cd wp-content/plugins/
    git clone git@github.com:innocode-digital/wp-force-non-public.git
    cd wp-force-non-public/
    composer install
    

If plugin was installed as regular plugin then activate Force Non-Public from Plugins page or WP-CLI: wp plugin activate wp-force-non-public.

Usage

To enable plugin it's required to add constant (usually to wp-config.php):

define( 'FORCE_NON_PUBLIC', true );