Rename WordPress admin URL wp-admin
Solution without plugins:
Edit the .htaccess and add the code below between the IfModule mod_rewrite.c tags:
RewriteRule ^admin$ /wp-login.php [NC,L]
RewriteRule ^admin/(.*) wp-admin/$1?%{QUERY_STRING} [L]
Also edit the wp-config.php and add:
define('WP_ADMIN_DIR', 'admin');
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . WP_ADMIN_DIR);
Edit the functions.php file from your theme and add:
add_filter('site_url', 'wpadmin_filter', 10, 3);
function wpadmin_filter( $url, $path, $orig_scheme ) {
$old = array( "/(wp-admin)/");
$admin_dir = WP_ADMIN_DIR;
$new = array($admin_dir);
return preg_replace( $old, $new, $url, 1);
}
And that's it! Enjoy
A better way would be to install the iThemes Security plugin (formerly Better WP Security).
Or follow this easy 5-step guide on changing wp-admin
.