Close this search box.

Home / Blog

How to Ensure your WordPress Website Stays Safe in 8 Easy Steps

How to Ensure your WordPress Website Stays Safe in 8 Easy Steps

How to ensure your WordPress website stays safe in 8 easy steps

In today’s online world, your WordPress website isn’t just a spot on the internet. It’s the face of what you do, whether that’s your business, sharing ideas, or showing off your brand. Now, here’s something to think about: every month, thousands of websites get hacked. And it’s not just the big names – even smaller websites can be targets.

In this article, I’ll walk you through eight simple, yet effective steps to fortify your WordPress site against these digital marauders. And the best part? You don’t need to be a tech wizard to implement them!

Ensure Strong Passwords and 2FA

Did you know that “123456” and “password” are still among the most common passwords? Shocking, right? Weak passwords are like leaving your front door unlocked, inviting trouble.

If you’re the only administrator of your website, just make sure you use a strong, ideally auto-generated password. If you have multiple user accounts, you can use a plugin like Password Policy Manager to enforce strong passwords for all of them.

To enhance your WordPress website’s security by implementing two-factor authentication (2FA), you can use the Two Factor Authentication plugin. This plugin adds an extra layer of security to your login process, significantly reducing the risk of unauthorized access.

Configuring the plugin typically involves these steps:

  1. Install and activate the Two Factor Authentication plugin from your WordPress dashboard.
  2. Go to the Users section in your WordPress dashboard.
  3. Select your profile or the profile of the user you want to configure 2FA for.
  4. Scroll down to the Two-Factor Options section.
  5. Choose the 2FA method you prefer (e.g., TOTP, SMS, Email, etc.). The TOTP method can be paired with the Google Authenticator app.
  6. Follow the instructions provided by the plugin to complete the setup, like scanning a QR code with the Google Authenticator app for TOTP.
  7. Save your changes.

This setup will ensure that every time you log in to your WordPress site, you will need to enter both your password and a code generated by the 2FA method you selected, offering a much stronger defense against unauthorized access. 

Backup Your WordPress

When it comes to safeguarding your WordPress website, backups are essential. They are your digital safety net, ready to catch you if something goes awry. However, relying solely on plugin-based backups is a bit like storing all your valuables in a flimsy shed. While these plugins can be convenient for regular backups and quick restorations, they often reside within the same environment as your WordPress site.

This means if your website suffers a catastrophic failure – say, from a severe hacking incident or a critical server malfunction – there’s a high chance your backups could be compromised or lost along with the site. This scenario is akin to keeping all your emergency supplies in a vulnerable spot, where the very disaster you’re protecting against could render them useless.

To truly bulletproof your backup strategy, consider implementing server-level backups. This approach involves storing your website backups on a separate server, often provided and managed by your hosting provider. Think of this as having a reinforced safe room for your digital assets. Even if the worst happens to your primary website, your backups remain secure, unaffected by the chaos.

Server-level backups are typically more robust and secure, offering features like automated scheduling, off-site storage, and even redundant copies in multiple locations. These backups are often more comprehensive too, capturing not just your WordPress files and database, but also your server configurations and environment settings. This holistic approach ensures that, in the event of a disaster, you can restore not just your site, but the exact environment it operates in, reducing downtime and technical complications.

Clean Up Plugins and Themes

Your WordPress website, much like any software environment, needs regular maintenance to stay secure and efficient. Unused or outdated plugins and themes can significantly compromise your website’s security and performance. These elements are potential vulnerabilities. Hackers and malicious software often target known weaknesses in outdated plugins and themes to gain unauthorized access to websites. The more plugins and themes you have installed, the larger your attack surface becomes. This means there are more opportunities for malicious entities to exploit security gaps.

To mitigate these risks, it’s crucial to regularly review your list of installed plugins and themes. Here’s a step-by-step approach:

  1. Audit Your Current Plugins and Themes: Regularly check which plugins and themes are installed and whether they are active or inactive. Consider the last time each was updated by the developer and the last time you actually used it.
  2. Backup Before Making Changes: See the previous chapter. Always back up your site before removing plugins or themes or performing updates. This ensures you can restore your site if something goes wrong during the process.
  3. Remove Unnecessary Elements: If a plugin or theme isn’t essential to the functionality of your site, or if you haven’t used it in a long time, it’s probably best to delete it. This reduces potential security vulnerabilities and can improve site performance.
  4. Regular Maintenance Schedule: Set a regular schedule for this maintenance work. Depending on the size and complexity of your site, this could be monthly or quarterly.
  5. Use Quality Plugins and Themes: When choosing new plugins or themes, opt for those with good reviews, active support from the developers, and regular updates. Quality matters more than quantity in keeping your site secure and efficient.

In essence, managing your WordPress site’s plugins and themes is not just about keeping it tidy; it’s a crucial part of maintaining its security and performance. Regularly auditing and updating your plugins and themes is as essential as any other security measure you take for your website. It’s an ongoing process that protects your site from potential threats and ensures it runs smoothly and efficiently for your users.

Update Your WordPress Regularly

Outdated software is one of the leading causes of website security breaches. Sucuri’s 2022 Website Threat Research Report identified that over 50% of all compromised websites were outdated at the point of infection.

How to Ensure your WordPress Website Stays Safe in 8 Easy Steps 1

Source: sucuri.net

The core software of WordPress, along with its themes and plugins, is continually evolving. Developers regularly release updates that often include critical security patches. By not updating your website, you’re effectively leaving the door wide open for hackers who exploit these vulnerabilities to gain unauthorized access, steal sensitive data, or even take control of your website.

Regularly updating your WordPress site, including the core, themes, and plugins, is crucial. It’s recommended to review and update your site at least every month. However, for the best security, you should check for updates more frequently. Most modern hosting platforms offer automatic updates for WordPress, but it’s still important to manually review your site to ensure everything is up to date and functioning correctly. This is especially true for themes and plugins, which might not be covered by automatic updates.

Understanding the challenges of keeping your WordPress site updated and secure can be overwhelming, especially when you have a business to run. That’s where our service, Care by BracketSpace, comes into play. We specialize in website maintenance, ensuring your WordPress site is always up-to-date with the latest software, themes, and plugins. Our team of experts provides regular check-ups, so you don’t have to worry about the vulnerabilities associated with outdated software. We ensure that your site remains secure, efficient, and performs at its best, giving you peace of mind and more time to focus on what you do best – running your business.

Disable XML-RPC

XML-RPC is a remote procedure call protocol that enables communication between WordPress and other systems. It’s like a secret handshake that lets different software talk to each other. However, this handshake can be mimicked by nefarious actors to initiate brute-force attacks. According to ManageWP, XML-RPC has been a common exploitation point

Fear not! You can disable it in three different ways.

Method 1: Manually Edit .htaccess File

To disable XML-RPC manually, you can add the following lines to your .htaccess file:

<Files xmlrpc.php>
    order deny,allow
    deny from all

This code blocks all incoming XML-RPC requests before WordPress processes them.

Method 2: Use a Code Snippet

Alternatively, you can use a code snippet to disable XML-RPC. Add the following code to your child theme’s functions.php file or a site-specific plugin:

add_filter( 'xmlrpc_enabled', '__return_false' );

This snippet uses the WordPress filter to disable XML-RPC.

Method 3: Use a Plugin

For a more user-friendly approach, you can use the Disable XML-RPC plugin. This plugin will disable XML-RPC without needing to edit code.

It’s important to choose the method that best suits your comfort level with code editing and your specific site needs. Remember to always back up your site before making any changes to the code or configuration.

Disable REST API

The REST API is a tool that enables external applications to interact with your WordPress site. Think of it as a bridge connecting your site to the outside world. While it’s powerful, it can be exploited to inject content, steal data, or even deface your website.

To block this bridge from the wrong crowd, you can either add a few lines of code to your site’s functions.php file or use a plugin for a more user-friendly approach.

Method 1: Use a Code Snippet

Add the following code to your child theme’s functions.php file or a site-specific plugin:

add_filter('rest_authentication_errors', function($result) {
    if (! empty($result)) {
        return $result;

    if (! is_user_logged_in()) {
        return new WP_Error(
            'You are not currently logged in.',
            ['status' => 401]

    return $result;

This code will block access to WP REST API for non-logged-in users, ensuring all the plugins that needs it still works in the WordPress dashboard.

Method 2: Use a Plugin

To disable the REST API on your WordPress site, you can use the Disable WP REST API plugin. This plugin is designed to disable the REST API for visitors who are not logged into WordPress. For logged-in users, the REST API works normally.

Once you install and activate this plugin, no further configuration is required. You can test its functionality by logging out of WordPress and requesting https://yourwebsite.com/wp-json/ in your browser. If it’s working correctly, you should see a message indicating that REST API access is restricted to authenticated users.

This plugin does the same as the code snippet above.

Disable File Edits

Editing plugin or theme files directly from the WordPress dashboard might seem convenient, but it’s like leaving a set of keys under your doormat. If attackers gain access to your WordPress dashboard, they can easily modify these files to inject malicious code.

To remove this risk, you can add the following codeto your wp-config.php file, effectively hiding those keys from prying eyes.

define('DISALLOW_FILE_EDIT', true);

Use a Network Firewall

A network firewall functions like a vigilant bouncer for your website, diligently screening and managing the traffic that comes through. Its primary role is to safeguard your digital presence from various cyber threats, including Distributed Denial of Service (DDoS) attacks, which can overwhelm your site with traffic, effectively shutting it down.

Utilizing a network firewall service like Cloudflare, which offers complimentary options, is an intelligent way to enhance your website’s security. Cloudflare operates by channeling your website’s traffic through its own network, scrutinizing and filtering out any suspicious or malicious activities before they reach your site.

This process not only shields your website from potential digital threats but also helps in maintaining optimal performance by managing traffic loads efficiently. Setting up Cloudflare is a straightforward process, making it accessible even to those who may not be tech-savvy. By integrating such a network firewall, you’re essentially placing a robust, proactive barrier between your website and the myriad of cyber threats lurking online.


Securing your WordPress site doesn’t have to be a Herculean task. By following these eight straightforward steps, you can significantly enhance your website’s security. Remember, a little effort goes a long way in the digital world. 

If you need a helping hand, our comprehensive service Care by BracketSpace is just a click away. We’ll perform not only updates, but also backup your website in a safe place, keep it monitored and ensure the best security practices are in place.

Share This Article:

Picture of Kuba Mikita

Kuba Mikita

Share This Article:


Picture of Kuba Mikita

Kuba Mikita

Share This Article:

Latest updates, discounts and more!

Get the most recent updates on WordPress automation, fresh plugins, new features and price cuts.

Related articles

Recently, we came across a problem, while developing a new version of the Notification plugin. We wanted to tidy up our codebase and one of the tasks was to rename...

Following the success of the Notification plugin, we knew that personalization was the direction we would pursue. Thanks to feedback, we were easily able to identify the needs of the...

WordPress Cron is pretty basic and doesn’t allow for much configuration in terms of schedules. By default, you can run your events with a specific interval, like daily, weekly, or...

WordPress Plugins that get the job done

With years of experience creating client websites, we bring our experience to functional WordPress plugins.

Easy to use for everyone

Regardless of experience level, you can easily use our products.

Top-notch Support included

We treat our clients seriously and focus heavily on support. Reviews backs this up!

Extensible and developer friendly

You're the same developer as we are. Our code is clean and extensible, just the way you like.