WordPress Security Best Practices for Responding to an Attack

WordPress Security Best Practices for Responding to an Attack
Home / Website Package / WordPress Security Best Practices for Responding to an Attack

A hacked WordPress site needs a calm, ordered response: limit access, preserve evidence, remove the cause, then restore a clean backup if needed. WordPress security best practices also include resetting passwords, rotating security keys and checking that every page loads over HTTPS. Acting quickly can help limit disruption while you work out what happened.

It’s unsettling to find unfamiliar users, changed pages or security warnings on your website. Don’t rush to reinstall everything or restore the latest backup before checking when the attack began. A backup created after the site was compromised could bring the problem back.

This guide covers what to do first, how to choose and restore a clean backup, and how to strengthen logins, security keys and HTTPS. You’ll also find practical ways to reduce the risk of another attack, without tackling every technical detail at once.

Key Takeaways

  • If your site may be compromised, limit access and check when the attack began before choosing a backup to restore.
  • Keep WordPress, themes and plugins updated, and remove anything you no longer use.
  • Make logins harder to break into with unique passwords, two-factor authentication and login attempt limits.
  • Store backups separately from your website so a clean copy is available if you need to recover.
  • Use HTTPS across your site and check that images and scripts load securely too.

1. How often should you change WordPress security keys?

WordPress doesn’t set a routine schedule for changing its security keys. Rotate them after a suspected attack, unauthorised access or exposure of your wp-config.php file. Changing the keys invalidates existing login sessions, so users will need to sign in again.

These keys and salts help protect information stored in browser cookies. They’re kept in wp-config.php alongside other settings WordPress needs to run your site. If an attacker obtains them, rotating the values can invalidate existing sessions. It won’t remove malware or fix an outdated plugin, so treat it as one response step, not a complete clean-up.

After a compromise, first secure administrator access and investigate how the attacker got in. Then generate new keys and salts, update them in wp-config.php, and require users to log in again. If you’re unsure how to edit the file safely, get technical help rather than risk making the site inaccessible.

How often should WordPress core, themes, and plugins be updated? Check for updates weekly and apply suitable security patches promptly. When possible, test updates on a backup or staging copy, especially if your site relies on plugins for bookings or payments.

Before updating, make a fresh backup and check that your current plugins and themes support the new version. Update WordPress core, themes and plugins, then review key pages and forms. Remove unused plugins and themes rather than leaving outdated code installed. Give each WordPress user only the access their role requires, and avoid shared administrator accounts.

A web application firewall filters malicious requests before they reach your server. Some protection filters traffic before it reaches WordPress, while a plugin-based firewall runs on the WordPress server and analyses requests at the application level. This distinction matters during an attack: a plugin may inspect traffic only after the web server has received it.

Security plugins can help with malware scans, hardening checks, login tools and activity monitoring. Use scans to flag suspicious files, then investigate alerts rather than assuming a clean result proves the site is safe. A plugin firewall and an external traffic filter do different jobs. Neither replaces updates, backups or secure access.

How do you choose secure WordPress hosting in Australia? Look for Australian hosting with server hardening, malware scanning, firewall protection, backups and account isolation. These features can reduce server-level risks, while WordPress updates and secure logins remain your responsibility.

Review firewall alerts and activity logs after making changes. Look for unexpected file edits or new administrator accounts. A security-conscious setup combines these checks with current software, carefully chosen plugins and a clear recovery plan.

2. Login attempt limits and CAPTCHA

A login page exposed to repeated guesses can become a target for brute-force attacks. Limit failed attempts, add another authentication step and use CAPTCHA to make automated sign-ins harder. These controls address different risks, so combine them rather than relying on just one.

Set a lockout after five failed login attempts, and make the lockout last at least 30 minutes. This slows repeated password guesses from an IP address. Check how your security tool handles legitimate users who mistype a password, and make sure administrators have a safe way to regain access.

Two-factor authentication requires each user to complete another verification step after entering a password. Enable it for every account with meaningful access, especially administrators and editors who can change site content. A one-time code from an authentication app is one option. Keep recovery details somewhere secure so a lost phone doesn’t lock the business out.

  • Use unique passwords. Give each WordPress account a different, hard-to-guess password. A password manager can help staff avoid reusing credentials from email or hosting accounts.
  • Remove shared logins. Create a separate account for each person who needs access. If a staff member leaves, disable their account without changing everyone else’s credentials.
  • Limit administrator access. Give users the lowest role that lets them do their work. A writer who publishes posts usually doesn’t need administrator permissions.
  • Avoid predictable usernames. Don’t use “admin” as the main account name. Choose a unique username, then pair it with a strong password and two-factor authentication.

CAPTCHA can challenge automated login bots before they submit repeated credentials. It can also help reduce automated spam in comments and forms. Choose a setup that suits how people use your site, and test it on mobile. A CAPTCHA that blocks real customers can create an access problem of its own.

A custom login URL may reduce casual discovery, but it doesn’t replace login limits or authentication. Attackers can find hidden paths through links, records or automated scanning. Keep the login protected even if its address has changed, and avoid sharing that address publicly unless necessary.

Login controls also need monitoring. Review failed attempts and activity logs for sudden bursts, unfamiliar locations or new administrator accounts. If you find an unknown account, disable it, reset affected passwords and investigate whether the same credentials were used for hosting or email.

For practical help keeping a WordPress site maintained, compare the website package options and consider what ongoing updates and security support your setup needs.

3. Incident response and restoring from backups

If your WordPress site shows unfamiliar changes, act in a clear order: limit further access, preserve evidence, identify a clean backup, then restore and check the site. Don’t overwrite files or logs before recording what you’ve found. Those details can help identify the entry point and prevent a repeat.

Start by documenting the symptoms: note changed pages, suspicious accounts, unusual traffic and when you first noticed them. If customers are affected, consider temporarily restricting access to sensitive site functions while you investigate. Avoid deleting suspicious files immediately, as that may remove useful evidence. Record affected usernames and unexpected changes to WordPress files.

Next, work out which backup could be clean. For example, if a site was compromised on May 1st but the issue was detected on May 12th, a backup created during that period might contain the attacker’s changes. Compare backup dates with known symptoms and choose a version from before the likely compromise. The latest copy isn’t always the safest one to restore.

  1. Contain access. Change administrator passwords, log out all users and remove accounts you don’t recognise. If the site is still under attack, reduce exposure to affected pages or functions.
  2. Preserve records. Save relevant activity logs, file copies and notes about unusual traffic. Keep these separate from the WordPress installation so a restore won’t erase them.
  3. Restore a clean copy. Restore both the database and website files from the same backup point where possible. A mismatch can cause missing pages, orders or other recent changes.
  4. Review the restored site. Check key pages, forms, account access and file integrity. Confirm that the suspicious changes haven’t returned before reopening normal access.
  5. Close the entry point. Update or remove the affected component, reinstall free plugins from a trusted source when needed, and reset passwords again if credentials may have been exposed.

Keep backups away from the web server. If an attacker gains access to the hosting account, a backup stored only on that server may also be at risk. The 3-2-1 approach means keeping three copies of data, on two storage types, with one copy off-site. Store backup access details separately from WordPress usernames and passwords.

A backup helps only if it can be restored. Test a restore in a separate environment and check that the database, images, themes and plugins work together. Confirm the restored WordPress version and review forms or checkout steps before returning the site to normal use. Keep a brief record of the restore steps, backup date and checks completed. This gives you a practical recovery plan for the next incident.

4. HTTPS and SSL certificates

An SSL certificate lets a browser establish an encrypted HTTPS connection with your website. This helps protect information travelling between a visitor and your server, such as passwords entered on a login page. It doesn’t remove malware or prevent every attack, so treat HTTPS as one part of your WordPress security setup.

Start by checking that your site opens with HTTPS, not just HTTP. Then redirect HTTP traffic to the secure version, so visitors don’t land on an unencrypted page. Google has used HTTPS as a search ranking signal since 2014, but encryption is valuable even without considering search visibility.

After enabling HTTPS, check for mixed content. This occurs when a secure page still loads an image, script or stylesheet over HTTP. For example, a WordPress homepage may show HTTPS in the address bar while an old image link remains insecure. Update those asset links, then review important pages, forms and login screens.

Follow this practical check after installing or renewing a certificate:

  • Open the homepage and key service pages using HTTPS.
  • Test forms and login screens, including password submission.
  • Check images, scripts and stylesheets for HTTP links.
  • Confirm HTTP addresses redirect to their HTTPS versions.
  • Review the certificate warning or expiry message in your browser.

Renew certificates before they expire. An expired certificate can trigger a browser warning and make visitors wary of the connection. Track the renewal process through your hosting control panel or certificate provider. After renewal, revisit the site and confirm the browser recognises the updated certificate.

TLS is the protocol that secures the connection; an SSL certificate helps establish the site’s identity and connection. Hosting settings control much of this setup, while WordPress settings and plugins can affect redirects and page links. If you change the site address in WordPress, check that both the WordPress address and site address use HTTPS.

Security headers provide instructions for browsers handling your website. For example, a header can tell browsers to use secure connections. Configure headers carefully: a conflicting setting can affect pages or embedded content. Check the result after each change rather than adding several rules at once.

HTTPS doesn’t filter malicious traffic or prevent repeated login attempts. A firewall filters traffic; HTTPS encrypts the connection. Keep these functions separate in your security plan, and test secure pages and normal site functions after a configuration change.

WordPress Security Best Practices for Responding to an Attack

5. Backing up a WordPress website

A backup is useful only if it captures everything your WordPress site needs to run. Schedule weekly snapshots of the complete installation, including WordPress core files and the database. The database holds content and settings; files include themes, plugins and uploaded images. Saving only one part can leave you with an incomplete recovery.

Choose a backup method that suits how often the site changes. A full snapshot copies the installation at a particular point in time. An incremental backup saves changes since an earlier copy, which can reduce storage use but depends on earlier backups being available. For a small business site, check that the schedule captures new enquiries, product details or blog updates before they disappear from the live site.

Keep backup copies away from the web server. If the server or hosting account is compromised, backups stored only there may be affected too. Use separate, secure storage and protect access with credentials that aren’t shared with WordPress. Two-factor authentication on the backup account adds another access check. Keep recovery details somewhere authorised staff can find them.

  • Include the database. A copy of the files alone won’t restore posts, pages or site settings.
  • Include the files. Check that uploads, themes, plugins and configuration files are covered.
  • Keep a dated record. Label each backup with its creation date and source, so you can identify a suitable version.
  • Protect access. Limit backup permissions to people who need them, and avoid storing credentials in a public document.
  • Check backup status. Review the latest completed copy and investigate any failed job before relying on it.

Don’t assume a completed backup will restore cleanly. Test a copy in a separate environment, then open pages and check images, forms and plugin functions. For an online store, review product pages and checkout steps. Testing can reveal missing files or a database copy that doesn’t match the saved WordPress version.

Set a clear recovery point for the site. A brochure website may change less often than a shop with frequent orders, so the impact of losing recent data varies. Decide which updates matter most, then check that your backup schedule captures them. Keep an earlier clean copy available in case a newer backup contains malicious changes or vulnerabilities.

Regular backups support recovery, but they don’t prevent attacks or fix the default weaknesses of an outdated setup. Pair them with updates, access controls and a tested restore process. If you need help with routine WordPress updates and security, explore website maintenance options.

Good Budget Website: Domain Name registration

Good Budget Website provides domain name registration and Australian hosting for small businesses setting up or rebuilding a WordPress site. If an attack has made your website unreliable, these services can help organise the essentials for a fresh setup. A new domain or hosting account won’t remove malware from an existing site, so handle the compromise and recovery separately.

Choose a Starter Website Package for a straightforward online presence, or a Business Website Package for a broader business site. Both offer a practical starting point when you’re ready to rebuild without taking on a complex custom project. Keep your WordPress updates, backups and login protections in your ongoing maintenance plan.

If you’re planning a new setup or rebuild, contact Good Budget Website to discuss the next step.

Make security part of your website routine

A WordPress site helps customers find and assess your business, so security needs an owner, not just a plugin. Set a routine for reviewing access, updates and recovery arrangements, and record who is responsible for each task. That makes it easier to act calmly when something changes, even if the person who usually manages the site is away.

Think of WordPress security best practices as ongoing care for a working business asset. As your site grows, review whether its setup still suits the way you operate. New staff, pages and online services can all affect who needs access and what needs protecting.

If you’re planning a new website or want a more straightforward setup, explore the website package options and choose a practical next step. A clear plan can make website upkeep easier to manage and help you keep moving with confidence.

Frequently Asked Questions

What to do if my WordPress website is hacked or attacked?

Secure the accounts connected to WordPress as well as the site itself. Start with the email account used for password resets, then review access to your domain and hosting control panels. Check for unexpected account alerts or DNS changes. If your site handles customer enquiries or payments, assess which pages and account details may have been exposed, and record what you find.

How often should you change WordPress security keys?

There’s no routine interval for changing security keys. Include key rotation in an access handover when someone with access to site configuration leaves or changes responsibilities. Plan the change for a time when you can help users who need to sign in again. Keep new values out of shared documents and limit access to the configuration file to people responsible for site administration.

What file permissions should WordPress use?

Use restrictive permissions that let WordPress read and run the files it needs without making everything writable. The right setup also depends on how the hosting account runs website processes and who owns the files. Avoid broad, recursive permission changes through a file manager or command line. If an update fails, check ownership and the specific error before widening access across the installation.

What are the essential WordPress security best practices for 2026?

For 2026, strong WordPress security best practices include assigning a person to oversee security tasks and recording important site changes. Keep an inventory of the plugins and themes the business relies on, so an unfamiliar addition stands out. Agree on who can approve changes and who handles recovery. After maintenance, check the customer journey, such as an enquiry form reaching the correct business inbox.

How should you securely configure WordPress logins, passwords, and two-factor authentication?

Protect the email account used for password resets, since access to that inbox can undermine WordPress login protections. Store two-factor recovery details separately from the phone or device used to sign in. When a team member changes roles, review their dashboard permissions and remove authentication methods they no longer need. Make sure everyone knows to report an unexpected sign-in prompt rather than approving it automatically.

How should you configure WordPress backups, and how often should backups be tested?

Test a restore after setting up a backup system, changing its storage location or altering what it captures. Repeat the test on a schedule that reflects how often the site changes and how disruptive data loss would be. Confirm restored pages display correctly and business-critical functions work. Keep a brief record of the test date, problems found and steps needed to fix them.

How can you protect a WordPress site with HTTPS, a web application firewall, and malware scanning?

Review firewall logs after enabling a new rule or changing a site feature. This can reveal whether the filter is blocking legitimate form submissions as well as suspicious traffic. Treat malware scan alerts as leads to investigate, not automatic proof that a file should be deleted. Compare a flagged file with a clean copy from its original source before acting, especially if it supports a key site function.

What WordPress user roles and file permissions reduce security risks?

Match dashboard roles to actual tasks: someone who edits pages doesn’t automatically need access to change site settings. Keep WordPress dashboard access separate from hosting control-panel or server access, which can expose files and configuration. Review custom roles before assigning them, as their capabilities may differ from standard WordPress roles. For file access, check that ownership and permissions suit the hosting setup instead of applying one setting everywhere.

Article by

Doug Durie

Doug Durie is the Founder of Marketing System Solutions, a growth-focused firm specialising in scalable marketing systems, automation, and strategic execution. He works closely with business owners and operators to design marketing infrastructures that prioritise efficiency, retention, and long-term commercial outcomes.

His approach centres on replacing fragmented tactics with structured systems that create predictable, compounding growth.

Disclaimer

This article is generated with the assistance of Large Language Models and is provided for general informational purposes only. While reasonable care is taken to ensure the content is accurate and up to date, Marketing System Solutions Pty Ltd makes no representations or warranties regarding the completeness, reliability, or suitability of the information.

Nothing in this article constitutes professional, financial, legal, or business advice. The content is general in nature and does not take into account your specific objectives, financial situation, or needs. You should seek independent professional advice before making any decisions based on this information.

Any reliance you place on this content is at your own risk. Marketing System Solutions Pty Ltd is not liable for any loss or damage arising from the use of, or reliance on, the information provided.

This article may contain references to third-party products, services, or websites. We may receive a commission, referral fee, or other benefit from these at no additional cost to you. Any such relationships do not influence the objectivity of the content.

Advertisements or external links that appear alongside this content may be managed by third-party platforms and are not controlled or endorsed by Good Budget Website or Marketing System Solutions Pty Ltd.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Articles