Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Disable wp-admin and wp-login
Plugin Name: Disable Admin and Login
Plugin URI:
Requires: PHP 5.3
add_action( 'init', function()
if( strpos( $currentURL, 'wp-admin' ) or strpos( $currentURL, 'wp-login' ) )
wp_redirect( site_url() );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment