Category: WordPress Security

  • How to clean malware-injected .htaccess files in WordPress

    How to clean malware-injected .htaccess files in WordPress

    Malware-injected .htaccess files are a WordPress malware infection in which an .htaccess file in every folder blocks PHP files, locking you out of wp-admin and breaking plugins and themes. Upload our standalone PHP cleanup script via FTP, run its dry-run mode, then remove only the malicious files by their content.

  • WordPress HTTP API security: how to block unwanted external connections

    WordPress HTTP API security: how to block unwanted external connections

    WordPress HTTP API security is a hardening practice that controls which external servers your site’s plugins and themes can connect to. Add WP_HTTP_BLOCK_EXTERNAL and WP_ACCESSIBLE_HOSTS to wp-config.php to block those requests except to hosts you trust. Audit your connections with Query Monitor first, or you’ll break updates and integrations.

  • How to block a country in WordPress without using paid plugins

    How to block a country in WordPress without using paid plugins

    Country blocking is a security measure that keeps visitors from the countries you choose off your WordPress site. You can do it for free with a mu-plugin that looks up each visitor’s country with a geolocation API and caches it for an hour, or with a custom WAF rule if you use Cloudflare.

  • Virus modifying l10n.php continuously

    Virus modifying l10n.php continuously

    The virus modifying l10n.php continuously is a WordPress malware infection that keeps adding an eval() backdoor to wp-includes/l10n.php, often every minute, even after you clean it. In our case, a malicious cron job caused the reinfection. Find it in cPanel > Advanced > Cron Jobs or with crontab -l over SSH, and delete it.

  • How to set up Cloudflare for WordPress websites

    How to set up Cloudflare for WordPress websites

    Cloudflare is a CDN and security service that sits between your WordPress site and its visitors. To set it up, add your domain to a free Cloudflare account, check the scanned DNS records and switch your nameservers. Then set SSL/TLS to Full (strict), cache HTML with Super Page Cache and add WAF rules.

  • Effective WooCommerce fraud prevention against bot transactions and card attacks

    Effective WooCommerce fraud prevention against bot transactions and card attacks

    Card testing bots use stolen card lists to place small orders straight through the WooCommerce REST API, so CAPTCHAs and fraud plugins on your checkout page never stop them. Check your access logs for hits to /wp-json/wc/store/checkout, then block that endpoint with a code snippet or a Cloudflare custom rule, and add reCAPTCHA to guest…

  • How to scan and remove malware from WordPress

    How to scan and remove malware from WordPress

    WordPress malware is malicious code that attackers hide in your site’s files or database to redirect visitors, send spam or steal data. To remove it, take a full backup, scan with Wordfence and repair or delete the infected files. Then change every password, delete unknown admin users and check for malicious cron jobs.