PHP Snippets: WordPress Security Hardening (10)

PHP Snippets: WordPress Security Hardening (10) — product preview

About this product

Ten copy-paste snippets that close common WordPress attack surface — XML-RPC, version leaks, brute force, spam and REST user listing.

Features

  • XML-RPC fully disabled, RSD/wlwmanifest links removed, X-Pingback header gone
  • Login throttling per IP (5 attempts / 15 min, both filterable) via transients
  • Comment honeypot, author-enumeration block, and logged-out REST user lockout
  • Baseline security headers + file-permission watchdog with admin warning
  • Each snippet standalone, documented, and harmless to the block editor

Install

  1. Back up your site (files + database).
  2. Paste the snippets you want into your child theme’s functions.php (05 goes in wp-config.php).
  3. Log out and verify: ?author=1 redirects home, /wp-json/wp/v2/users returns 401, xmlrpc.php reports disabled.

Requirements

WordPress 5.6+, PHP 7.4+. FTP/SSH access for wp-config.php edit and permission fixes.

Customer reviews

No reviews yet — be the first to review this product.

Buy this product to write a review

Only verified buyers can review — that keeps every review honest.

Buy now
Review rules: Only customers who purchased this product can review it. One review per customer — you can edit yours anytime. New and edited reviews appear after approval. We never publish fake reviews.

Similar products

See more →
PHP Snippets: WordPress Security Hardening (10)
$15.00
Add to Cart