This snippet automatically logs out inactive users after a specified idle time. It improves admin panel security and protects user accounts on shared devices. Features Auto logout inactive users Session timeout security Protects admin dashboard Reduces unauthorized access risk
Prevents AI bots and spam requests from abusing REST endpoints.
Prevents editing theme/plugin files from admin.
Prevents public search queries using ?s=.
Redirects wp-login.php access to homepage.
Disables XML-RPC endpoint to reduce brute-force and pingback attacks.
Prevents public exposure of WordPress usernames through REST API endpoints. Helps improve WordPress security by reducing user enumeration attacks.
Blocks attackers from discovering usernames using ?author=1