Whether your website is large or small, losing site data or being unable to manage your own site can be nerve-wracking. WordPress drives 25% of the world’s web. For hackers, WordPress websites are one of their most important targets.
In this article, we will discuss some tips to enhance WordPress security.
1. Bcrypt Password Hashing
WordPress was founded in 2003, when PHP and the Web were still in their infancy. At that time, Facebook had not yet appeared, and PHP did not have an OOP architecture; therefore, the security of WordPress today is slightly outdated, such as the way its passwords are encrypted.
WordPress still uses MD5 hashing today. Basically, it just turns 123456 into this: e10adc3949ba59abbe56e057f20f883e.
However, today’s computers are much more sophisticated than they were 10 years ago, so such passwords can be easily broken.
Since version 5.5, PHP has a local encryption method. If your WordPress website uses a PHP version higher than 5.5, you can use this feature.
You can install Composer or MU-Plugins plug-in to resave your password.
2. Enable WordPress.com protection
Brute-force is the most common password cracking method used by hackers. Therefore, you need to set some passwords that are very difficult to guess.
Automattic, the parent company of WordPress.com, has acquired a very popular anti-brute-force plugin. The name of this plug-in is BruteProtect, and it has now been integrated into Jetpeck.
It turns out that the protection efficiency of this plug-in is very good.
First, you need to install the latest version of Jetpack and then connect your website to WordPress.com. Then open the protection module and add your own IP to the whitelist.
# After that, your website will be more secure.
3. Hide login URL
Everyone knows that to log in to the WordPress backend, you only need to add wp-login.php after the domain name. Not only you know it, but hackers also know it. Therefore, you need to hide your login URL and make this URL only available to you.
Luckily, you can achieve this with some simple plugins:
1) iThemes Security
2) WPS Hide Login
4. Turn off "Forgot Password"
The "Forgot Password" function allows you to retrieve your password through other methods, but hackers can also This is how to get your password. Therefore, you'd better turn off this feature.
We need to create a new file and upload it, name it forget-password.php.
First, we need to change the URL of the lost password:
function lostpassword_url() { return site_url( 'wp-login.php' ); } add_filter( 'lostpassword_url','lostpassword_url' );
Remove link. However, WordPress does not support this natively, so we need to use JavaScript.
function lostpassword_elem( $page ) { ?> <script type="text/javascript"> (function(){ var links = document.querySelectorAll( 'a' ); for (var i = links.length - 1; i >= 0; i--) { if ( links[i].innerText === "Lost your password?" ) { links[i].parentNode.removeChild( links[i] ); } }; }()); </script> <?php } add_action( 'login_footer', 'lostpassword_elem' );
Finally, redirect the "lost password" URL to the login page.
function lostpassword_redirect() { if ( isset( $_GET[ 'action' ] ) ){ if ( in_array( $_GET[ 'action' ], array( 'lostpassword', 'retrievepassword' ) ) ) { wp_redirect( '/wp-login.php', 301 ); exit; } } } add_action( 'init','lostpassword_redirect' );
5. Enable HTTPS
HTTPS provides an extra layer of protection for your site and can also improve your ranking in search engines. Now you can get an HTTPS certificate for free through the Let’s Encrypt project.
For WordPress websites, you can easily use this certificate using WP Encrypt. What I suggest you do now is use HTTPS.
For more wordpress related technical articles, please visit the wordpress tutorial column to learn!
The above is the detailed content of How to improve the security of wordpress. For more information, please follow other related articles on the PHP Chinese website!

Can learn WordPress within three days. 1. Master basic knowledge, such as themes, plug-ins, etc. 2. Understand the core functions, including installation and working principles. 3. Learn basic and advanced usage through examples. 4. Understand debugging techniques and performance optimization suggestions.

WordPress is a Content Management System (CMS). It provides content management, user management, themes and plug-in capabilities to support the creation and management of website content. Its working principle includes database management, template systems and plug-in architecture, suitable for a variety of needs from blogs to corporate websites.

WordPressisgoodforvirtuallyanywebprojectduetoitsversatilityasaCMS.Itexcelsin:1)user-friendliness,allowingeasywebsitesetup;2)flexibilityandcustomizationwithnumerousthemesandplugins;3)SEOoptimization;and4)strongcommunitysupport,thoughusersmustmanageper

Wix is suitable for users who have no programming experience, and WordPress is suitable for users who want more control and expansion capabilities. 1) Wix provides drag-and-drop editors and rich templates, making it easy to quickly build a website. 2) As an open source CMS, WordPress has a huge community and plug-in ecosystem, supporting in-depth customization and expansion.

WordPress itself is free, but it costs extra to use: 1. WordPress.com offers a package ranging from free to paid, with prices ranging from a few dollars per month to dozens of dollars; 2. WordPress.org requires purchasing a domain name (10-20 US dollars per year) and hosting services (5-50 US dollars per month); 3. Most plug-ins and themes are free, and the paid price ranges from tens to hundreds of dollars; by choosing the right hosting service, using plug-ins and themes reasonably, and regularly maintaining and optimizing, the cost of WordPress can be effectively controlled and optimized.

The core version of WordPress is free, but other fees may be incurred during use. 1. Domain names and hosting services require payment. 2. Advanced themes and plug-ins may be charged. 3. Professional services and advanced features may be charged.

WordPress is easy for beginners to get started. 1. After logging into the background, the user interface is intuitive and the simple dashboard provides all the necessary function links. 2. Basic operations include creating and editing content. The WYSIWYG editor simplifies content creation. 3. Beginners can expand website functions through plug-ins and themes, and the learning curve exists but can be mastered through practice.

People choose to use WordPress because of its power and flexibility. 1) WordPress is an open source CMS with strong ease of use and scalability, suitable for various website needs. 2) It has rich themes and plugins, a huge ecosystem and strong community support. 3) The working principle of WordPress is based on themes, plug-ins and core functions, and uses PHP and MySQL to process data, and supports performance optimization.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Chinese version
Chinese version, very easy to use