Blocking wp-login.php brute forcing
This guide will tell you how to setup a custom fail2ban filter and jail to watch the Apache access log and ban malicious attackers who brute for wp-login.php.
Install fail2ban using apt
# apt install fail2ban
npm install --save asset-builder browser-sync del gulp gulp-autoprefixer gulp-changed gulp-concat gulp-cssnano gulp-flatten gulp-if gulp-imagemin gulp-jshint gulp-less gulp-plumber gulp-rename gulp-rev gulp-sass gulp-sourcemaps gulp-uglify imagemin-pngcrush jshint jshint-stylish lazypipe merge-stream minimist run-sequence traverse wiredep gulp-util gulp-combine-mq critical gulp-rename gulp-penthouse |
/*! | |
* gulp | |
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
*/ | |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), |
<?php | |
/** | |
* How To Disable Admin Notices In WordPress | |
* | |
*/ | |
add_action('admin_enqueue_scripts', 'os_admin_theme_style'); | |
add_action('login_enqueue_scripts', 'os_admin_theme_style'); | |
function os_admin_theme_style() { | |
$super_admins = array( 5 ); | |
if( ! in_array( get_current_user_id(), $super_admins ) ){ |
/** | |
* | |
* Shortcode contact form | |
*/ | |
// @codingStandardsIgnoreStart | |
function decorativefair_shortcode_product_form($item) { | |
ob_start(); | |
global $post, $product; | |
$author_name = get_the_author_meta( 'user_email', $product->post->post_author ); |
<?php | |
/* | |
* | |
* Countdown Timer Shortcode | |
* [cdt month="9" day="28" year="2021"] This is content that will only be shown after a set number of days.[/cdt] | |
* | |
*/ | |
// @codingStandardsIgnoreStart | |
function aet_content_countdown($atts, $content = null){ | |
extract(shortcode_atts(array( |
#!/bin/bash | |
# ------------------------------------------------- | |
# Make site directory | |
# Download WP and install WP to site directory | |
# Set WP configuration | |
# Configure NGINX for new domain-name | |
# ------------------------------------------------- | |
# | |
# Requirments: | |
# |
function ns_hide_plugin() { | |
global $wp_list_table; | |
$hidearr = array('wordfence/wordfence.php', 'updraftplus/updraftplus.php', 'wp-security-audit-log/wp-security-audit-log.php', 'simple-history/index.php', 'user-switching/user-switching.php'); | |
$myplugins = $wp_list_table->items; | |
foreach ($myplugins as $key => $val) { | |
if (in_array($key,$hidearr)) { | |
unset($wp_list_table->items[$key]); | |
} | |
} | |
} |
<div class="posts-listings"> | |
<?php | |
$args = array( | |
'posts_per_page' => '1', | |
'orderby' => 'featured-checkbox', | |
'order' => 'ASC', | |
'meta_query' => array( | |
array( |
<?php | |
//send a welcome email when a user account is activated | |
add_action( 'bp_core_activated_user', 'yz_welcome_user_notification', 10, 3 ); | |
function yz_welcome_user_notification( $user_id, $key = false, $user = false ) { | |
if ( is_multisite() ) { | |
return ;// we don't need it for multisite | |
} | |
//send the welcome mail to user |
This guide will tell you how to setup a custom fail2ban filter and jail to watch the Apache access log and ban malicious attackers who brute for wp-login.php.
# apt install fail2ban