Nginx in front of WordPress: full page caching with FastCGI, HTTP/3 and QUIC, rules that block xmlrpc.php and sensitive files, and log-based bans with Fail2ban.
Set correct Linux file permissions for WordPress directories and use .htaccess rules to block PHP execution in the uploads folder, stopping a common malware vector.
Protect wp-config.php and xmlrpc.php with .htaccess wp-config.php is the most sensitive file of a WordPress site: the database name, user and password in plain text, the authentication keys and salts, the table prefix. Normally PHP executes the file and a direct request returns an empty page. But that depends on PHP working: if the PHP…