Why not just disable comments and registration?
This comes to mind also:
(Redirect all requests to login page or admin pages to homepage. A little irreversible.)
$currentURL = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if (strpos($currentURL, 'wp-admin' ) or strpos($currentURL, 'wp-login' )) {
header( 'Location: '.site_url() );
}
Caution: this stops you from logging in also.
Edit:
And adaptation of the above code put into plugin format can be found here. Thanks to brasofilo.
Modified code:
add_action( 'init', function()
{
$currentURL = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if( strpos( $currentURL, 'wp-admin' ) or strpos( $currentURL, 'wp-login' ) )
exit( wp_redirect( site_url() ) );
} );
Related Posts:
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site? [closed]
- Why does the URL http://a/%%30%30 crash Google Chrome?
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site?
- How to view PHP on live site
- Can an attacker use inspect element harmfully?
- Hide the fact a site is using WordPress?
- Verifying that I have fully removed a WordPress hack?
- WordPress 4.7.1 REST API still exposing users
- Can I Prevent Enumeration of Usernames?
- Should I escape wordpress functions like the_title, the_excerpt, the_content
- Should I remove install.php and install-helper.php?
- When to use esc_html and when to use sanitize_text_field?
- Are Nonces Useless?
- What is the difference between esc_html filter vs attribute_escape filter?
- Why does WordPress have more than one salt?
- What is the ideal setup to address security concerns?
- Will there be security updates for 3.1 once 3.2 is released?
- How do I technically prove that WordPress is secure?
- WordPress it’s cleaning a custom query_var to avoid sql injections?
- How do WordPress Nonces Work?
- Tips for finding SPAM links injected into the_content
- Is WordPress vulnerable to the httpoxy?
- Prevent setup-config.php page from appearing when host blocks database
- wp.getUsersBlogs XMLRPC Brute Force Attack/Vulnerability
- WordPress and Security
- Is security a problem in WordPress?
- Is there a security risk giving someone temporary access to my blog’s code?
- Is /wp-login.php?redirect_to[] exploitable?
- How to properly sanitize/secure a WP Query coming from the front end
- Logout via Subdomain, non-wordpress page on a different server?
- brute force attack even though it is limited by IP
- What should I do about hacked server?
- How do I authenticate WP users from a chrome extension?
- Website is being flooded [closed]
- Is there any point setting the keys and salts in wp-config.php?
- Auth cookie value security risk?
- Where to store OAuth 2.0 client id and secret?
- Security – Shortcode injection attack
- Registration Plugin – Recaptcha integration
- How can I safely use $_SERVER[‘REQUEST_URI’] to avoid XSS?
- How to combat flooding admin-ajax.php?
- Dangers to allowing Access-Control-Allow-Origin: * for Feeds only?
- Moving away from MD5: Where to declare the custom global $wp_hasher?
- Would it be dangerous to send all the wp_options to javascript file?
- Changing Table Prefixes – once done, am I good to go going forward?
- Should I disable directory listing for wp-includes?
- Safety side of storing emoji into database
- Verifying that I have fully removed a WordPress hack?
- Large Session Tokens
- How can I safely hide the fact that my website runs on WordPress? [closed]
- How can I display nickname instead username in links
- My WordPress Websites are always under attack
- Is there value in using a wp_nonce for POST requests?
- Using an Encryption class in a WordPress Plugin
- How to hide easy access to my website temporarily?
- Can I Remove xmlrpc.php completely?
- Are un-sanitized theme options more vulnerable to malicious scripts than the theme editor?
- Secure WordPress: Change admin
- Changing the default header name
- Is it safe to use a global wp nonce per user instead of a nonce per action?
- Wordfence detects change in wp-admin/includes/upgrade.php
- Any any insecure http:// URLs left in wordpress?
- Will there be security updates for WordPress 4.9.9
- White screen of death on admin pages after moving wp-config up two levels for security
- Can a WordPress administrator see other users’ passwords?
- Why my plugins are updating automatically?
- Any known bugs that could cause disappearance of the wp_users table?
- On new server, site got hacked, permissions a bit strange? Please help
- Privilege escalation bugs in 2.9?
- 404/500 error on content images if Referer header is from another domain [closed]
- Content-Security-Policy blocks WordPress check boxes from being activated
- Restrict Access without Creating Users
- Switching between security plugins is a risk?
- How to obfuscate wp-config.php or code
- wordpress admin security
- Why do people use “admin” username by default? [closed]
- Are major WordPress updates mandatory for security?
- i moved wp-config.php outside of public html and this broke my website
- Is it safe to use the basic administration with reduced rights for private member space
- WordPress Database Re-installed (Hacked)
- Verifying that I have fully removed a WordPress hack?
- WordPress Security tools
- Robots.txt file not updating
- How can I stop other plugins from using my class’ sensitive methods?
- wordpress security (only one part of the site)
- What are WordPress Current Security Issues in 2017?
- wp-config.php moved above root results in no plugin updates
- Password-protect feed and make it usable in major aggregators
- Folder Permissions + Security Concerns
- Malware/Permission bug removal?
- Could a user account with a stolen password compromised entire WP site?
- how to find the way they hacked my WP site
- is this code properly secured
- Run a security scan on WordPress site that has .htaccess password [closed]
- nginx + wordpress: Best practices for configuring it to be secure, reliable, and fast? [closed]
- How to get real password (before encrypt) when register a user?
- How do you search for backdoors from the previous IT person?
- How to test if my server is vulnerable to the ShellShock bug?
- Is wp-cron.php vulnerable to external attacks and how to protect it?
- How to address security vulnerabilities: LUCKY13, BEAST, and BREACH