In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about how to change the login address of wordpress. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
In recent days, the default login address of the small station has been attacked (scanned), an average of hundreds of times a day, although it looks nothing, it will be knocked open. But there's always a chance! Although the small station is not important. Originally, it was to block ip directly, but the ip is not fixed these days, so simply modify the default login address! Here are some common modification methods
Method one
Plug-in modification-Stealth Login Page
Install the plug-in at the background, and find Stealth Login Page in the settings properties. For more information, please see the figure below:
After completion, the interface is as follows:
Method two
Add the following code to the theme functions.php:
/ / backend access address modification add_action ('login_enqueue_scripts','login_protection'); function login_protection () {if ($_ GET [' psu']! = 'papapa') header (' Location: https://www.yflad.cn/');})
After the modification is completed, the login address in the background will become the https:// domain name / wp-login.php?psu=papapa. If it is not this address, it will automatically jump to the https:// domain name /. It is followed by a psu=papapa parameter.
There are three parameters that can be customized
Psu,papapa,https:// domain name /
If you use this method to indicate an error, you can replace it with the following:
Function login_protection () {if ($_ GET ['psu']! =' papapa') {$url = "https://www.yflad.cn";echo"; echo" _ window.location.href='$url' "; echo";} add_action ('login_enqueue_scripts','login_protection')
The above code is a jump through JS, and the effect is the same.
Method three
Modify WordPress program
1. Rename the wp-login.php file in the root directory of the WordPress program, modify it at will, such as zhangsan.php, and then open the file with a code editor. Ctrl+H replaces all wp-login characters with zhangsan and saves exit.
2, this step can be ignored, find the general-template.php file in the wp-includes directory, open it with an editor, and replace all wp-login characters with zhangsan by Ctrl+H. Then search for the variable $login_url and change it to look like this:
$login_url = site_url ('404.htmlfloor,' login')
The 404.html, which can be customized
Summary
Personally, I recommend method two. Method one, for people with obsessive-compulsive disorder, can be one less plug-in, never install more plug-ins; method three, you need to modify the core program of WordPress, or after the WordPress update, you need to modify it. Therefore, the method of modifying the core program is not very recommended.
Of course, if you disable automatic WordPress updates, it is recommended that you combine method 2 and method 3. At present, this is the small station.
Thank you for reading! The method of changing the login address of wordpress is shared here. I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.