Improving WordPress Security in 2021

What Is WordPress?

WordPress is a PHP-based content management system that may be used in conjunction with MySQL. The best part about WordPress is that it is free and open source software. It offers many plugins and themes that make it easier for non-technical users to deploy a website. It also allows continuous backup. And since it is open-source, there is no need to worry about security because most of the major flaws have already been addressed.

What Are the Basic WordPress Vulnerabilities and How Can I Patch Them?

Considering WordPress is open source and very customizable, there are a few issues to address while installing it on your server. We’ll go through some of the WordPress flaws and how to protect your installation.

Directory listing

As the name implies, this vulnerability lists all of the files that have been uploaded or exist in the WordPress installation, and it is most typically seen at <WordPress website>/WP-content/uploads. If the directory listing is not deactivated, all of the files on the server become publicly available, and anyone can freely browse or download them.

To fix this flaw, you must change the web server’s .htaccess file, and you need to manually add an entry in that “Options All-Indexes” folder. Once added, it will disable all the directory listings on your web server.

Changing the database name from default

The primary task is to keep the database safe and secure, as it contains all of the information about the program and its registered users. As a result, anytime developers install a WordPress application, a new database with the default name, “WP_,” is also created.

As a result, a developers’ first priority is to modify its default name, which is well-known to everyone. Because it is easily identifiable, attackers can exploit it and leak the entire database. As a result, if the developer uses a different name than the default, the attacker may be unable to determine that this database belongs to WordPress. To change the database name, you can use any of the plugins available on the WordPress marketplace and simply type in some simple information, and you’re done. 

Using plugins for security

Every developer wants to integrate excellent plugins and themes to make their application more appealing. However, if there is a vulnerability in any of the plugins, WordPress hackers can take advantage of those utilizing that specific plugin. Plugins that are integrated into programs currently are not vulnerable. However, there is a risk that a vulnerability will exist in the future.

As a result, users must keep track of the version and the corresponding vulnerability on a regular basis. Users can also store their applications using the Defender Pro utility. This tool has so many functions—regular monitoring, authentication protection by adding 2FA, masking upon login, changing file restores, and mending them. Not only must all of this be done, but an assessment report must also be provided.

Using Strattic

Using Strattic

Instead of doing more about the security, like installing plugins and such, you can use Strattic. Strattic provides some great features like:

  • Free SSL certificate: The important thing when serving to the client should be encrypted communication. Strattic provides the SSL certificate for free. So when the user is interacting with the website, there is no possibility of an MITM attack.
  • Daily Backups: it is necessary to backup your WordPress installation. So Strattic provides an automated solution to this. It has the functionality to take daily and on-demand backups.
  • CSP Policies: It also has CSP protection. The content on the website is secure. There is no need to customize CSP policies or something always.
  • DDOS mitigation: Using DDOS to exploit a site is not rocket science. Strattic, thus, provides DDOS protection, so you needn’t worry about DDOS attacks on your website.
  • Global CDN: WordPress’s content delivery network is spread across 225 locations. So your website will always load faster, and won’t depend on the region in which your customers are located.

Removing the version and readme files

When an attacker tries to gather information in a WordPress application, they begin their search by checking the WordPress version and readme.txt file—some of the outdated versions may include certain known vulnerabilities that they can exploit. WordPress installation and all of its plugins include a readme file that contains the plugin’s version and other information. These can be checked at <WordPress Website URL>/plugins/<plugin_name>readme.txt.

To check the version of the WordPress application, an attacker has several options, including inspecting the Meta Generator Tag in the source code, and viewing them in the readme.html file that exists in the root folder in older versions. There are numerous ways in which the WordPress version can be leaked. Most developers fail to disguise the versions in the meta generator tag.

When you initially install WordPress, you must remove the readme file. After that, you can use some of the plugins to remove the version from the meta generator tag.

Disabling the WP-JSON API

WordPress has a JSON API, which may be found at <wp-json/wp/v2>. JSON makes a lot of user information available to the public. If you navigate to wp-json/wp/v2/users, you will see all of the information about the users added to the WordPress installation.

It is important to disable the wp-json API in the WordPress installation to protect it from brute force attacks such as credentials stuffing or password spraying.

Using Wordfence

Using Wordfence

Wordfence is a popular firewall with built-in virus scanning technology that can protect the WordPress application. Based on its own intelligence, it has its own firewall rules and signature to recognize threats. This information is regularly updated to protect apps from zero-day vulnerabilities.

It not only detects but also prevents malicious behavior. As a result, it cannot cause any further harm. It features security policies at a few endpoints, such as login. It also has a centralized policy that is imposed on apps. It can make decisions based on IP, region, country, agent header, and hostname. It provides many facilities for use, which are easy to implement.


As with everything, there are advantages and disadvantages. The advantage of WordPress is that it is relatively simple to set up. On the other hand, it has some built-in weaknesses. Therefore, you must carefully consider and install it after mitigating all of its previously identified weaknesses. They will assist in making the WordPress application error-free and protecting it from attacks.


Ehacking Staff
With more than 50 global partners, we are proud to count the world’s leading cybersecurity training provider. EH Academy is the brainchild of Ehacking, which has been involved in the field of training since the past Five years and continues to help in creating professional IT experts.

Most Popular

What Makes ICS/OT Infrastructure Vulnerable?

Infrastructure security for operational technologies (OT) and industrial control systems (ICS) varies from IT security in several ways, with the inverse confidentiality, integrity, and...

Everything You Must Know About IT/OT Convergence

What is an Operational Technology (OT)? Operational technology (OT) is a technology that primarily monitors and controls physical operations. It can automate and control machines,...

Understand the OT Security and Its Importance

This article discusses OT security and why it is essential for protecting industrial systems from cyberattacks. We will also discuss common control objectives that can...

What is Deepfake, and how does it Affect Cybersecurity?

Producing deepfake is easy. It is hard to detect. They operate with a description of reality rather than reality itself (e.g., a video). Any...