将wp-admin url更改为其他内容? [重复]

This question already has an answer here:

I like to change the wordpress wp-admin URL to something else to save my site from bruteforce attacks.

Most important thing is that i like to build this without plugin.

So, if anyone have any idea then do lemme know.

I applied changes as per the below links: https://w3reign.com/how-to-change-wp-admin-url-in-wordpress-without-plugin/

but it's working but when i fire the http://site_url/admin_url it's showing wp-login.php.

So, how can i do so ?

</div>
  1. Create a new file in your WP root folder.
  2. Copy the code from default wp-login.php and paste it into your new file.
  3. Replace all the instaces of wp-login.php with the new file name(Find and replace)
  4. Delete/rename the wp-login.php file.
  5. Login through your new URL.

Hope it helps. For detail, use this

I have never try that before but i found this

Add this code to wp-config.php

define( 'WP_ADMIN_DIR', 'private-area' );  
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . WP_ADMIN_DIR );

and add this code to your function.php

add_filter( 'site_url', 'change_wpadmin_url', 10, 3 );  
function change_wpadmin_url( $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 finally add this code to htaccess file

RewriteRule ^private-area/(.*) wp-admin/$1?%{QUERY_STRING} [L]

Hope this will help you.