Download the PHP package njamin/wp-hardening without Composer

On this page you can find all versions of the php package njamin/wp-hardening. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-hardening

njamin/wp-hardening

A WordPress security baseline, loaded as a must-use plugin. It covers what a clean install leaves open, and changes nothing a site's own code relies on.

Requirements

WordPress 7.0 or later, PHP 8.3 or later.

Install

Then load it from a must-use plugin, e.g. wp-content/mu-plugins/bp-loader.php:

Settings

Every setting is an optional constant in wp-config.php:

Constant Purpose
BP_TRUSTED_PROXIES, BP_CLIENT_IP_HEADER The proxies (CIDRs) whose forwarded client IP header is believed, and which header that is
BP_LOGIN_IP_LIMIT, BP_LOGIN_IP_WINDOW Failed logins allowed per IP, and over how many seconds
BP_LOST_PASSWORD_LIMIT Lost-password requests per IP and hour (default 5)
BP_PASSWORD_MIN_LENGTH, BP_BREACHED_PASSWORD_CHECK Password length, and the breach check on or off
BP_2FA_ROLES, BP_2FA_EXEMPT_USERS Roles that must use 2FA; users exempt on a local environment only
BP_ADMIN_SESSION_LIFETIME Administrator session length, in seconds
BP_ALLOW_APPLICATION_PASSWORDS Application passwords stay off unless this is true
BP_SVG_SANITISER Allows SVG uploads through the named sanitiser
BP_PROTECTED_PLUGINS Plugins the admin can't deactivate
BP_LOG_KEY Key of the HMAC that pseudonymises users and IPs in security events
BP_DISABLE_HARDENING Kill switch, for an emergency: everything above stops

Tests

The integration suite boots a real WordPress: BP_WP_LOAD=/path/to/wp-load.php vendor/bin/phpunit.

Security

Report a vulnerability privately through this repository's Security → Report a vulnerability, not in a public issue.

Licence

GPL-2.0-or-later. This repository is a read-only mirror: changes are made upstream and published here with each release.


All versions of wp-hardening with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package njamin/wp-hardening contains the following files

Loading the files please wait ...