How to hide WordPress backend login address? 3 ways to modify the login URL

how to hideWordPress backendLogin address? 3 ways to modify the login address

I believe many useWordPress websiteof webmasters have encountered brute force attacks on websites.

Although they haven't been cracked, they often panic when they receive email alerts of failed logins.

In this case, the best way is to modify/hide the background login address of our website.

The default login address of the WordPress background is: /wp-login.php

Method 1: Add Code to Change WordPress Login Address

This is still fine for a WordPress site, just in the functions.php file of the theme we use ?> Add the following code before:

//更改WordPress登录地址
add_action('login_enqueue_scripts','login_protection');
function login_protection(){
if($_GET['word'] != 'press')header('Location: https://www.chenweiliang.com/'); 
}

Please Note

  • The address redirected by the wrong address is not necessarily your own site.
  • you can skip directly toTaobao, or other complex or slow sites.
  • It is also a good choice to make the computer of the other party get stuck. This method is recommended, which is simple and effective.

Method 2: Modify the file name to hide the WordPress background login address

Change the wp-login.php file name in the website root directory to wp-denglu.php (or other name).

Then in this file wp-denglu.php, the characters that appear in wp-login.php are changed to wp-denglu.php;

The wp-includes/general-template.php file is found in the root directory, but the code is probably on line 238.

$login_url = site_url('wp-login.php', 'login');
  • Do not modify other characters in this file.
  • Replace wp-login.php with wp-denglu.php, take care to overwrite the original file, and save it when you are done modifying it,
  • This method prevents hackers from knowing your WordPress login address.

Method 3: Install a plugin to hide the WordPress backend login address

We can modify the background login address through the WPS Hide Login plugin.

1) Directly in the WordPress backend Plugins → Install Plugins,search for"WPS Hide Login” and install this plugin.

2) Then find the WordPress backendSettings → General.

At the bottom of the general settings page, you can see the modification options for WPS hidden login ▼

How to hide WordPress backend login address? 3 ways to modify the login URL

Fill in the login address to be set directly in the form and save it. 

special reminder

  • Whether it isWordPress websiteOr zblog to build a website, after modifying the background login address,
  • It is recommended to add the modified login address directly to the browser's favorites or to remember it.
  • There is no need to add a WordPress backend login address button or link in the WordPress frontend.

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "How to hide the WordPress background login address? 3 Ways to Modify the Login URL" will help you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-1721.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top