Download the PHP package szepeviktor/waf4wordpress without Composer

On this page you can find all versions of the php package szepeviktor/waf4wordpress. 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 waf4wordpress

WAF for WordPress

License PHP Version Packagist stats Latest version PHPStan enabled

Stop real-life attacks on your WordPress website and trigger Fail2Ban.

:bulb: Before using this WAF you have to clean your website, get rid of even tiny errors. See your access and error logs daily and run this WAF without Fail2ban for a week.

This WAF does not give proper HTTP responses to unusual requests. It blocks the attacking IP address instantly, the purpose of this are the following.

  1. Prevent website compromise in further requests
  2. Prevent DoS attacks

Shared hosting has no server-wide banning (because of trust issues) but you can still install this software without Fail2Ban to stop attacks by using one of the Miniban methods.

Support my work

Please consider sponsoring me monthly if you use my packages in an agency.

Sponsor

Theory

Your WordPress - really general HTTP - security consists of the followings.

  1. Use HTTPS
  2. Have daily backups
  3. Block known hostile networks
  4. Have Fail2Ban installed (controls the firewall)
  5. Maintain your website and use strict Fail2Ban filters which ban on the first suspicious request instantly
  6. Deny direct access to core WordPress files, themes and plugins
  7. Install WAF for WordPress (this project)
  8. Use Leanmail for filtering Fail2Ban notification emails

See the Block WordPress attack vectors note in my other repository for an overview of the topic.

Composer installation

Technically this is not a WordPress plugin nor an MU plugin. WAF for WordPress is distributed and autoloaded as a Composer package.

  1. Issue composer require szepeviktor/waf4wordpress command
  2. Load vendor/autoload.php from your wp-config
  3. Instantiate SzepeViktor\WordPress\Waf\HttpAnalyzer class early in wp-config

  4. Create an MU plugin in wp-content/mu-plugins/waf4wordpress.php

Manual installation

:bulb: Please see Composer-managed WordPress for managing WordPress with Composer.

Technically this is not a WordPress plugin nor an MU plugin.

  1. First download WAF for WordPress then extract files to a directory, e.g. waf/
  2. Instantiate SzepeViktor\WordPress\Waf\HttpAnalyzer class early in wp-config

  3. Create an MU plugin in wp-content/mu-plugins/waf4wordpress.php

Configuration

WAF for WordPress is configured in source code before class instantiation. in wp-config.

Create custom filters for Fail2Ban catching these PHP messages.

How to support PayPal IPN, Braintree and custom entry points in poorly written plugins

Copy this into your in wp-config.php.

Bug reports and feature requests

Open a new issue

Where script kiddies look for WordPress

Best not to create these directories to avoid lengthy log excerpts.


All versions of waf4wordpress with dependencies

PHP Build Version
Package Version
Requires php Version ~7.4.0
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 szepeviktor/waf4wordpress contains the following files

Loading the files please wait ....