How to Secure Your WordPress Website and Protect It from Common Threats
WordPress powers millions of websites, making it a frequent target for automated attacks, malicious software, and attempts to exploit outdated plugins or weak passwords.
Fortunately, many common WordPress security risks can be reduced through regular maintenance, strong account protection, and careful website management.
Lagrange Point Media (LPM) provides hosting infrastructure and security-related tools to help support your website. However, customers using DIY Hosting are responsible for maintaining the security of their WordPress installations, user accounts, plugins, and themes.
This guide explains practical steps you can take to improve your website's security.
1. Keep WordPress, Plugins, and Themes Updated
Outdated software is a common source of website vulnerabilities.
WordPress core, plugins, and themes may receive updates that address security issues, compatibility problems, and software bugs.
To check for updates:
-
Sign in to your WordPress dashboard.
-
Navigate to Dashboard > Updates.
-
Review available updates.
-
Create a current backup before making significant changes.
-
Apply the appropriate updates.
-
Test your website afterward.
You can also manage supported WordPress updates through WP Toolkit in cPanel.
Important: Security updates should be applied promptly, with appropriate compatibility checks. Delaying critical security fixes can leave your website exposed to known vulnerabilities.
2. Use Strong Passwords
Weak or reused passwords can allow unauthorized access to your website.
Use strong, unique passwords for:
-
WordPress administrator accounts.
-
Your LPM client portal.
-
cPanel.
-
Database users.
-
Email accounts.
-
Other services connected to your website.
A password manager can help generate and securely store unique passwords.
Avoid sharing passwords through email, public messages, or unsecured documents.
Tip: If multiple people need access to your website, create separate user accounts rather than sharing one administrator login.
3. Enable Two-Factor Authentication
Two-factor authentication (2FA) adds another verification step to the login process.
For example, after entering a password, a user may be required to enter a temporary code generated by an authenticator application.
WordPress does not provide a universal built-in 2FA system for standard user logins, but compatible plugins can add this functionality.
To enable 2FA:
-
Choose a reputable WordPress security or authentication plugin.
-
Install and activate it.
-
Open its authentication settings.
-
Follow the instructions to configure 2FA.
-
Save any provided recovery codes securely.
-
Test the login process before requiring 2FA for other users.
Important: Losing access to your authentication method can prevent you from signing in. Maintain secure recovery options.
4. Limit Administrator Access
WordPress includes user roles that control what each person can do.
Common roles include:
-
Administrator: Has broad control over a standard WordPress website.
-
Editor: Can manage and publish content, including content created by other users.
-
Author: Can publish and manage their own posts.
-
Contributor: Can write and manage their own posts but cannot publish them.
-
Subscriber: Generally has limited account and profile capabilities.
Plugins may add additional roles or modify permissions.
To review users:
-
Open your WordPress dashboard.
-
Navigate to Users > All Users.
-
Review existing accounts.
-
Check each user's assigned role.
-
Remove unnecessary access or adjust roles as appropriate.
Security Tip: Only grant administrator access to people who genuinely need it.
5. Remove Unused Plugins and Themes
Unused software can create unnecessary security risks.
Even when a plugin is deactivated, its files may remain on the server.
To remove unused plugins:
-
Navigate to Plugins > Installed Plugins.
-
Deactivate the plugin if necessary.
-
Click Delete.
-
Confirm the removal.
To remove unused themes:
-
Navigate to Appearance > Themes.
-
Select an inactive theme.
-
Open its details.
-
Click Delete, if available.
Do not remove the parent theme required by an active child theme.
Keeping a current default WordPress theme available can also be useful for troubleshooting.
Important: Deleting a plugin does not necessarily remove all of its database records or settings.
6. Use HTTPS and SSL Certificates
HTTPS encrypts information transmitted between your website and its visitors.
LPM uses Let's Encrypt with cPanel AutoSSL to provide certificates for eligible hosted domains.
To verify HTTPS:
-
Visit your website using
https://. -
Confirm that the browser does not display a certificate warning.
-
Test important internal pages.
-
Check for insecure resources or mixed content warnings.
If your website has a valid certificate, cPanel may provide a Force HTTPS Redirect option through its Domains interface.
Important: HTTPS protects information in transit, but it does not prevent malware infections, unauthorized WordPress logins, or vulnerable plugins from being exploited.
7. Consider a WordPress Security Plugin
WordPress security plugins can provide additional protections.
Depending on the plugin, features may include:
-
Login attempt controls.
-
Two-factor authentication.
-
Malware scanning.
-
File change monitoring.
-
Security configuration checks.
-
Firewall functionality.
-
Notifications about suspicious activity.
Before choosing a security plugin, review its compatibility, resource requirements, and available features.
Some advanced protections may require a paid subscription or external service.
Important: A security plugin is not a guarantee against hacking. It should complement regular updates, strong authentication, backups, and responsible website management.
Avoid installing several security plugins with overlapping functions unless you understand how they interact.
8. Review WordPress Security Settings with WP Toolkit
LPM provides WP Toolkit through cPanel.
WP Toolkit includes security-related checks and configuration options for supported WordPress installations.
To review them:
-
Sign in to the LPM Client Portal.
-
Open cPanel.
-
Search for WP Toolkit.
-
Select your WordPress installation.
-
Review the available security status and security measures.
-
Read the explanation of each recommended change before applying it.
Some security measures may affect custom functionality or compatibility with plugins.
Warning: Do not apply unfamiliar security changes without understanding their effects. WP Toolkit's available features depend on its version, edition, and hosting configuration.
9. Protect Your WordPress Configuration Files
WordPress uses several important files that should be protected from unauthorized access.
One of the most sensitive is:
wp-config.php
This file typically contains database connection credentials and other configuration settings.
You can inspect your website files using cPanel File Manager.
However, avoid modifying sensitive configuration files unless necessary.
Security Best Practices:
-
Do not share configuration files publicly.
-
Avoid storing unprotected copies in public directories.
-
Use appropriate file permissions.
-
Do not place database passwords in support tickets.
-
Remove unnecessary installation and backup archives.
Important: File permission requirements vary by server configuration. Avoid setting files or directories to 777 as a general troubleshooting solution.
10. Maintain Independent Website Backups
Backups are essential for recovering from security incidents and other failures.
LPM maintains scheduled hosting backups, but customers should also maintain independent copies of their websites.
A complete WordPress backup generally includes:
-
Website files.
-
WordPress database.
-
Uploaded media.
-
Themes and plugins.
-
Important configuration files.
Store backups securely outside your hosting account whenever practical.
Important: A backup is only useful if it is accessible, complete enough for recovery, and can be successfully restored.
For frequently updated websites, consider whether your backup schedule adequately protects recent changes.
11. Recognize Signs of a Compromised Website
A compromised WordPress website may exhibit unusual behavior.
Possible warning signs include:
-
Unexpected administrator accounts.
-
Unknown plugins or files.
-
Unauthorized content changes.
-
Redirects to unfamiliar websites.
-
Browser malware warnings.
-
Suspicious outgoing email activity.
-
Unexplained changes to website settings.
-
Unexpected modifications to application files.
However, these symptoms do not always indicate a security breach.
For example, unexpected redirects may also result from incorrect website configuration.
Important: Investigate suspicious activity rather than assuming every website error is caused by malware.
12. What to Do If You Suspect Your Website Has Been Hacked
If you believe your WordPress website has been compromised:
-
Avoid making unnecessary changes that could destroy useful evidence.
-
Record the symptoms and approximate time they began.
-
Review administrator accounts for unauthorized access.
-
Change passwords for affected accounts from a trusted device.
-
Review recently modified plugins, themes, and files.
-
Check available security alerts and logs.
-
Contact LPM support if hosting-related assistance is needed.
Depending on the situation, additional steps may include malware investigation, removing unauthorized files, replacing compromised software, rotating credentials, and restoring known-clean data.
Important: Simply restoring an older backup does not guarantee that a website is clean. The backup itself may contain compromised files, and the original vulnerability may still exist.
A proper recovery should address both the malicious changes and the weakness that allowed the compromise.
13. Protect Contact Forms and User Submissions
Contact forms, registration pages, and other public-facing forms can attract automated spam and abuse.
Depending on your form plugin, protective measures may include:
-
CAPTCHA or similar verification.
-
Honeypot fields.
-
Rate limiting.
-
Spam filtering.
-
Email verification.
-
Restrictions on file uploads.
Use controls appropriate to the type of information your website collects.
Important: No anti-spam method blocks every automated submission. Review form activity periodically and keep your form plugins updated.
14. Be Careful with File Uploads
Allowing visitors to upload files can introduce security risks if uploads are not properly validated and handled.
If your website accepts uploads:
-
Restrict permitted file types.
-
Apply appropriate file size limits.
-
Keep the upload-handling plugin updated.
-
Restrict access to uploaded files when necessary.
-
Avoid allowing executable files to run from upload directories.
-
Review how the application stores and processes uploads.
WordPress and third-party plugins may handle uploads differently.
Security Warning: Do not assume that restricting a file's extension alone is sufficient to make uploads safe.
15. Avoid Untrusted or Pirated WordPress Software
Premium WordPress plugins and themes are sometimes distributed through unofficial websites.
These downloads may contain modified code, malware, hidden administrator access, or other unwanted functionality.
We recommend downloading software directly from:
-
The official WordPress plugin and theme directories.
-
The software developer's official website.
-
Other trusted distribution sources.
Avoid using pirated or modified commercial plugins and themes.
Important: Even legitimate software can contain vulnerabilities. Trusted sources reduce certain risks but do not eliminate the need for updates and security monitoring.
16. Review Your Website Regularly
WordPress security is an ongoing responsibility.
A practical maintenance routine includes:
-
Reviewing available software updates.
-
Checking administrator accounts.
-
Removing unnecessary plugins and themes.
-
Verifying backups.
-
Reviewing security notifications.
-
Testing important website functionality.
-
Checking SSL certificate status.
-
Investigating unusual activity.
The appropriate frequency depends on how frequently your website changes and how important it is to your business operations.
17. Understanding DIY Hosting Responsibilities
LPM manages the underlying hosting infrastructure and provides tools for managing your website.
With DIY Hosting, customers are generally responsible for:
-
Maintaining WordPress.
-
Updating plugins and themes.
-
Managing WordPress users.
-
Configuring application-level security.
-
Maintaining independent backups.
-
Reviewing website functionality.
-
Addressing vulnerabilities in their installed software.
LPM's Managed Website Services provide additional website management and maintenance assistance according to the selected service package.
If you prefer not to handle WordPress maintenance yourself, a managed service may be a better fit.
18. Getting Help from LPM
If your website displays security warnings, you suspect unauthorized access, or you encounter a hosting-related security problem, contact LPM support.
Submit a support ticket through the LPM Client Portal.
Please include:
-
Your domain name.
-
A description of the suspicious activity.
-
When the problem began.
-
Any relevant error messages or security alerts.
-
Whether you recently installed or updated software.
-
Whether unauthorized changes have been identified.
Do not include passwords or sensitive credentials in your support ticket.
LPM can assist with hosting-related security issues. Advanced malware remediation, forensic investigation, custom code repairs, and website reconstruction may require a separate service.
Additional Resources: