<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>security recovery Archives - Developry Plugins</title>
	<atom:link href="https://developryplugins.com/tag/security-recovery/feed/" rel="self" type="application/rss+xml" />
	<link>https://developryplugins.com/tag/security-recovery/</link>
	<description></description>
	<lastBuildDate>Mon, 24 Nov 2025 11:18:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://developryplugins.com/wp-content/uploads/2026/06/cropped-favicon-alt-32x32.webp</url>
	<title>security recovery Archives - Developry Plugins</title>
	<link>https://developryplugins.com/tag/security-recovery/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Fix Hacked WordPress Site: Complete Recovery Guide</title>
		<link>https://developryplugins.com/how-to-fix-hacked-wordpress-site-complete-recovery-guide/</link>
		
		<dc:creator><![CDATA[Krasen Slavov]]></dc:creator>
		<pubDate>Fri, 10 Jul 2026 09:00:00 +0000</pubDate>
				<category><![CDATA[WordPress Security & Protection]]></category>
		<category><![CDATA[hack cleanup]]></category>
		<category><![CDATA[hacked wordpress]]></category>
		<category><![CDATA[malware removal]]></category>
		<category><![CDATA[security recovery]]></category>
		<category><![CDATA[site recovery]]></category>
		<guid isPermaLink="false">https://developryplugins.com/?p=136</guid>

					<description><![CDATA[<p>Discovering your WordPress site has been hacked is a nightmare scenario. Your homepage is defaced, Google is showing malware warnings, or visitors are being redirected to suspicious sites. Don’t panic—most...</p>
<p>The post <a href="https://developryplugins.com/how-to-fix-hacked-wordpress-site-complete-recovery-guide/">How to Fix Hacked WordPress Site: Complete Recovery Guide</a> appeared first on <a href="https://developryplugins.com">Developry Plugins</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><!-- @format --></p>
<p>Discovering your WordPress site has been hacked is a nightmare scenario. Your homepage is defaced, Google is showing malware warnings, or visitors are being redirected to suspicious sites. Don’t panic—most WordPress hacks can be cleaned up and prevented from happening again.</p>
<p>This comprehensive recovery guide walks you through every step of detecting, cleaning, and hardening a compromised WordPress site to restore security and prevent future attacks.</p>
<h2 id="recognizing-the-signs-of-a-hack">Recognizing the Signs of a Hack</h2>
<h3 id="common-hack-indicators">Common Hack Indicators</h3>
<p><strong>Visible Changes:</strong></p>
<ul>
<li>Defaced homepage with hacker messages</li>
<li>Spam content injected into posts/pages</li>
<li>Unwanted redirects to pharmaceutical or adult sites</li>
<li>Pop-ups and ads you didn’t add</li>
</ul>
<p><strong>Performance Issues:</strong></p>
<ul>
<li>Extremely slow loading times</li>
<li>Server resource exhaustion</li>
<li>Database connection errors</li>
</ul>
<p><strong>External Warnings:</strong></p>
<ul>
<li>Google Safe Browsing warning (“This site may be hacked”)</li>
<li>Hosting provider suspension notice</li>
<li>Antivirus alerts when visiting your site</li>
<li>Blacklist notifications from security tools</li>
</ul>
<p><strong>Backend Anomalies:</strong></p>
<ul>
<li>Unauthorized admin accounts</li>
<li>Unknown files in WordPress directories</li>
<li>Modified file timestamps</li>
<li>Can’t log into wp-admin</li>
</ul>
<h2 id="immediate-response-actions">Immediate Response Actions</h2>
<h3 id="step-1-dont-panicassess-the-situation">Step 1: Don’t Panic—Assess the Situation</h3>
<p>Take screenshots of all symptoms. Document everything you notice before making changes.</p>
<h3 id="step-2-take-site-offline-if-severely-compromised">Step 2: Take Site Offline (If Severely Compromised)</h3>
<p>If the site is distributing malware or severely defaced, enable maintenance mode.</p>
<div class="sourceCode" id="cb1">
<pre class="sourceCode php"><code class="sourceCode php"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="co">// Quick maintenance mode - add to wp-config.php</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;WP_MAINTENANCE_MODE&#39;</span><span class="ot">,</span> <span class="kw">true</span><span class="ot">);</span></span></code></pre>
</div>
<p>Or use the .htaccess method:</p>
<div class="sourceCode" id="cb2">
<pre class="sourceCode apache"><code class="sourceCode apache"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="co"># In .htaccess (temporary)</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a><span class="ex">RewriteEngine</span><span class="ch"> </span><span class="kw">on</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true"></a>RewriteCond<span class="st"> %{REMOTE_ADDR} !^123\.456\.789\.0</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true"></a>RewriteCond<span class="st"> %{REQUEST_URI} !/maintenance.html$ [NC]</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true"></a>RewriteRule<span class="st"> .* /maintenance.html [R=302,L]</span></span></code></pre>
</div>
<h3 id="step-3-contact-your-hosting-provider">Step 3: Contact Your Hosting Provider</h3>
<p>Inform them immediately. They may:</p>
<ul>
<li>Provide server logs</li>
<li>Identify the attack vector</li>
<li>Temporarily restore from their backups</li>
<li>Assist with malware scanning</li>
</ul>
<h3 id="step-4-change-all-passwords-immediately">Step 4: Change ALL Passwords Immediately</h3>
<p>Don’t wait—change these NOW from a secure device:</p>
<div class="sourceCode" id="cb3">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="co"># Via WP-CLI (if available)</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true"></a><span class="ex">wp</span> user update USERNAME --user_pass=NEW_STRONG_PASSWORD</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true"></a></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true"></a><span class="co"># Database password in wp-config.php</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true"></a><span class="ex">define</span>(<span class="st">&#39;DB_PASSWORD&#39;</span>, <span class="st">&#39;new_secure_password&#39;</span>);</span></code></pre>
</div>
<p><strong>Change:</strong></p>
<ul>
<li>WordPress admin passwords</li>
<li>Database passwords</li>
<li>FTP/SFTP credentials</li>
<li>Hosting control panel</li>
<li>Email accounts associated with site</li>
</ul>
<h2 id="scanning-for-malware">Scanning for Malware</h2>
<h3 id="automated-scanning-tools">Automated Scanning Tools</h3>
<p><strong>Sucuri SiteCheck (Free Online Scanner):</strong></p>
<p>Visit https://sitecheck.sucuri.net and enter your URL. It detects:</p>
<ul>
<li>Malware signatures</li>
<li>Blacklist status</li>
<li>Spam injections</li>
<li>Outdated software</li>
</ul>
<p><strong>Wordfence Security Plugin:</strong></p>
<div class="sourceCode" id="cb4">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a><span class="co"># Install via WP-CLI</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true"></a><span class="ex">wp</span> plugin install wordfence --activate</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true"></a><span class="ex">wp</span> wordfence scan</span></code></pre>
</div>
<p>Wordfence scans for:</p>
<ul>
<li>Known malware patterns</li>
<li>Modified core files</li>
<li>Backdoors</li>
<li>Suspicious code</li>
</ul>
<p><strong>Other Tools:</strong></p>
<ul>
<li>MalCare Security Scanner</li>
<li>Quttera Web Malware Scanner</li>
<li>VirusTotal (for file uploads)</li>
</ul>
<h3 id="manual-detection-methods">Manual Detection Methods</h3>
<p><strong>Check File Modification Dates:</strong></p>
<div class="sourceCode" id="cb5">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="co"># Via SSH - find recently modified files</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a><span class="fu">find</span> /path/to/wordpress -type f -mtime -7 -ls</span></code></pre>
</div>
<p><strong>Search for Suspicious Code Patterns:</strong></p>
<div class="sourceCode" id="cb6">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a><span class="co"># Look for base64 encoding (common in malware)</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a><span class="fu">grep</span> -r <span class="st">&quot;base64_decode&quot;</span> /path/to/wordpress</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true"></a></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true"></a><span class="co"># Find eval() functions</span></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true"></a><span class="fu">grep</span> -r <span class="st">&quot;eval(&quot;</span> /path/to/wordpress</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true"></a></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true"></a><span class="co"># Search for malicious functions</span></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true"></a><span class="fu">grep</span> -r <span class="st">&quot;system\|passthru\|shell_exec\|exec&quot;</span> /path/to/wordpress</span></code></pre>
</div>
<p><strong>Common Malware Locations:</strong></p>
<ul>
<li>wp-content/uploads/ (PHP files shouldn’t be here)</li>
<li>Theme’s functions.php (check for appended code)</li>
<li>wp-includes/ (core files shouldn’t be modified)</li>
<li>Root directory hidden files (.htaccess, index.php)</li>
</ul>
<h2 id="cleanup-procedures">Cleanup Procedures</h2>
<h3 id="option-1-restore-from-clean-backup">Option 1: Restore from Clean Backup</h3>
<p><strong>If you have a pre-hack backup:</strong></p>
<div class="sourceCode" id="cb7">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true"></a><span class="co"># Backup current (infected) site first</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true"></a><span class="fu">tar</span> -czf infected-backup-<span class="va">$(</span><span class="fu">date</span> +%Y%m%d<span class="va">)</span>.tar.gz /path/to/wordpress</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true"></a></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true"></a><span class="co"># Restore clean backup</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true"></a><span class="co"># (Restoration method varies by backup solution)</span></span></code></pre>
</div>
<p><strong>Verify backup integrity:</strong></p>
<ul>
<li>Check backup date predates the hack</li>
<li>Test in staging environment first</li>
<li>Confirm no malware in backup</li>
</ul>
<h3 id="option-2-manual-malware-removal">Option 2: Manual Malware Removal</h3>
<p><strong>Step 1: Fresh WordPress Core Installation</strong></p>
<div class="sourceCode" id="cb8">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true"></a><span class="co"># Download clean WordPress</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true"></a><span class="fu">wget</span> https://wordpress.org/latest.tar.gz</span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true"></a><span class="fu">tar</span> -xzf latest.tar.gz</span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true"></a></span>
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true"></a><span class="co"># Replace core files (NOT wp-content!)</span></span>
<span id="cb8-6"><a href="#cb8-6" aria-hidden="true"></a><span class="fu">cp</span> -r wordpress/wp-admin/* /path/to/site/wp-admin/</span>
<span id="cb8-7"><a href="#cb8-7" aria-hidden="true"></a><span class="fu">cp</span> -r wordpress/wp-includes/* /path/to/site/wp-includes/</span>
<span id="cb8-8"><a href="#cb8-8" aria-hidden="true"></a><span class="fu">cp</span> wordpress/*.php /path/to/site/</span></code></pre>
</div>
<p><strong>Step 2: Clean Theme Files</strong></p>
<div class="sourceCode" id="cb9">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true"></a><span class="co"># Download fresh copy of your theme from source</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true"></a><span class="co"># Compare with infected version using diff</span></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true"></a><span class="fu">diff</span> -r clean-theme/ infected-theme/</span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true"></a></span>
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true"></a><span class="co"># Or use WP-CLI to reinstall theme</span></span>
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true"></a><span class="ex">wp</span> theme install theme-name --force</span></code></pre>
</div>
<p><strong>Step 3: Reinstall All Plugins</strong></p>
<div class="sourceCode" id="cb10">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true"></a><span class="co"># Get list of installed plugins</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true"></a><span class="ex">wp</span> plugin list</span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true"></a></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true"></a><span class="co"># Reinstall each plugin from WordPress.org</span></span>
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true"></a><span class="ex">wp</span> plugin install plugin-name --force</span>
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true"></a></span>
<span id="cb10-7"><a href="#cb10-7" aria-hidden="true"></a><span class="co"># For premium plugins, re-upload from original source</span></span></code></pre>
</div>
<p><strong>Step 4: Clean wp-config.php</strong></p>
<p>Look for suspicious code:</p>
<div class="sourceCode" id="cb11">
<pre class="sourceCode php"><code class="sourceCode php"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true"></a><span class="co">// MALICIOUS - Remove this type of code</span></span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true"></a><span class="er">@</span><span class="kw">include</span> <span class="st">&quot;</span><span class="kw">\x2f</span><span class="st">hom</span><span class="kw">\x65</span><span class="st">/us</span><span class="kw">\x65</span><span class="st">r/p</span><span class="kw">\x75</span><span class="st">blic</span><span class="kw">\x5f</span><span class="st">html/</span><span class="kw">\x77</span><span class="st">p-co</span><span class="kw">\x6e</span><span class="st">fig.p</span><span class="kw">\x68</span><span class="st">p&quot;</span><span class="ot">;</span></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true"></a></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true"></a><span class="co">// LEGITIMATE wp-config.php should only have:</span></span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true"></a><span class="co">// - Database credentials</span></span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true"></a><span class="co">// - Security keys</span></span>
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true"></a><span class="co">// - Table prefix</span></span>
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true"></a><span class="co">// - ABSPATH define</span></span></code></pre>
</div>
<p><strong>Step 5: Clean .htaccess</strong></p>
<p>Replace with default WordPress .htaccess:</p>
<div class="sourceCode" id="cb12">
<pre class="sourceCode apache"><code class="sourceCode apache"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a><span class="co"># </span><span class="re">BEGIN</span><span class="co"> WordPress</span></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true"></a><span class="fu">&lt;IfModule</span><span class="at"> mod_rewrite.c</span><span class="fu">&gt;</span></span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true"></a><span class="ex">RewriteEngine</span><span class="ch"> </span><span class="kw">On</span></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true"></a>RewriteRule<span class="st"> .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]</span></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true"></a>RewriteBase<span class="st"> /</span></span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true"></a>RewriteRule<span class="st"> ^index\.php$ - [L]</span></span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true"></a>RewriteCond<span class="st"> %{REQUEST_FILENAME} !-f</span></span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true"></a>RewriteCond<span class="st"> %{REQUEST_FILENAME} !-d</span></span>
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true"></a>RewriteRule<span class="st"> . /index.php [L]</span></span>
<span id="cb12-10"><a href="#cb12-10" aria-hidden="true"></a><span class="fu">&lt;/IfModule&gt;</span></span>
<span id="cb12-11"><a href="#cb12-11" aria-hidden="true"></a><span class="co"># </span><span class="re">END</span><span class="co"> WordPress</span></span></code></pre>
</div>
<p>Remove suspicious redirects or auto_prepend_file directives.</p>
<h2 id="database-cleanup">Database Cleanup</h2>
<h3 id="remove-malicious-database-entries">Remove Malicious Database Entries</h3>
<p><strong>Check wp_options for injected scripts:</strong></p>
<div class="sourceCode" id="cb13">
<pre class="sourceCode sql"><code class="sourceCode sql"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true"></a><span class="co">-- Backup database first!</span></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true"></a><span class="kw">SELECT</span> <span class="op">*</span> <span class="kw">FROM</span> wp_options <span class="kw">WHERE</span> option_value <span class="kw">LIKE</span> <span class="st">&#39;%&lt;script%&#39;</span>;</span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true"></a><span class="kw">SELECT</span> <span class="op">*</span> <span class="kw">FROM</span> wp_options <span class="kw">WHERE</span> option_value <span class="kw">LIKE</span> <span class="st">&#39;%base64%&#39;</span>;</span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true"></a><span class="kw">SELECT</span> <span class="op">*</span> <span class="kw">FROM</span> wp_options <span class="kw">WHERE</span> option_value <span class="kw">LIKE</span> <span class="st">&#39;%eval(%&#39;</span>;</span></code></pre>
</div>
<p><strong>Clean wp_posts table:</strong></p>
<div class="sourceCode" id="cb14">
<pre class="sourceCode sql"><code class="sourceCode sql"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true"></a><span class="co">-- Find spam injections</span></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true"></a><span class="kw">SELECT</span> <span class="op">*</span> <span class="kw">FROM</span> wp_posts <span class="kw">WHERE</span> post_content <span class="kw">LIKE</span> <span class="st">&#39;%viagra%&#39;</span> <span class="kw">OR</span> post_content <span class="kw">LIKE</span> <span class="st">&#39;%cialis%&#39;</span>;</span></code></pre>
</div>
<p><strong>Remove unauthorized admin users:</strong></p>
<div class="sourceCode" id="cb15">
<pre class="sourceCode sql"><code class="sourceCode sql"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true"></a><span class="co">-- List all administrators</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true"></a><span class="kw">SELECT</span> <span class="op">*</span> <span class="kw">FROM</span> wp_users u</span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true"></a><span class="kw">JOIN</span> wp_usermeta um <span class="kw">ON</span> u.<span class="kw">ID</span> <span class="op">=</span> um.user_id</span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true"></a><span class="kw">WHERE</span> um.meta_key <span class="op">=</span> <span class="st">&#39;wp_capabilities&#39;</span></span>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true"></a><span class="kw">AND</span> um.meta_value <span class="kw">LIKE</span> <span class="st">&#39;%administrator%&#39;</span>;</span>
<span id="cb15-6"><a href="#cb15-6" aria-hidden="true"></a></span>
<span id="cb15-7"><a href="#cb15-7" aria-hidden="true"></a><span class="co">-- Delete suspicious user</span></span>
<span id="cb15-8"><a href="#cb15-8" aria-hidden="true"></a><span class="kw">DELETE</span> <span class="kw">FROM</span> wp_users <span class="kw">WHERE</span> <span class="kw">ID</span> <span class="op">=</span> suspicious_id;</span>
<span id="cb15-9"><a href="#cb15-9" aria-hidden="true"></a><span class="kw">DELETE</span> <span class="kw">FROM</span> wp_usermeta <span class="kw">WHERE</span> user_id <span class="op">=</span> suspicious_id;</span></code></pre>
</div>
<p><strong>Clear spam comments:</strong></p>
<div class="sourceCode" id="cb16">
<pre class="sourceCode sql"><code class="sourceCode sql"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true"></a><span class="co">-- Delete spam comments</span></span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true"></a><span class="kw">DELETE</span> <span class="kw">FROM</span> wp_comments <span class="kw">WHERE</span> comment_approved <span class="op">=</span> <span class="st">&#39;spam&#39;</span>;</span></code></pre>
</div>
<h2 id="security-hardening-post-cleanup">Security Hardening Post-Cleanup</h2>
<h3 id="regenerate-security-keys">Regenerate Security Keys</h3>
<p>Visit https://api.wordpress.org/secret-key/1.1/salt/ and replace all keys in wp-config.php:</p>
<div class="sourceCode" id="cb17">
<pre class="sourceCode php"><code class="sourceCode php"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;AUTH_KEY&#39;</span><span class="ot">,</span>         <span class="st">&#39;new-unique-key-here&#39;</span><span class="ot">);</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;SECURE_AUTH_KEY&#39;</span><span class="ot">,</span>  <span class="st">&#39;new-unique-key-here&#39;</span><span class="ot">);</span></span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;LOGGED_IN_KEY&#39;</span><span class="ot">,</span>    <span class="st">&#39;new-unique-key-here&#39;</span><span class="ot">);</span></span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;NONCE_KEY&#39;</span><span class="ot">,</span>        <span class="st">&#39;new-unique-key-here&#39;</span><span class="ot">);</span></span>
<span id="cb17-5"><a href="#cb17-5" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;AUTH_SALT&#39;</span><span class="ot">,</span>        <span class="st">&#39;new-unique-key-here&#39;</span><span class="ot">);</span></span>
<span id="cb17-6"><a href="#cb17-6" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;SECURE_AUTH_SALT&#39;</span><span class="ot">,</span> <span class="st">&#39;new-unique-key-here&#39;</span><span class="ot">);</span></span>
<span id="cb17-7"><a href="#cb17-7" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;LOGGED_IN_SALT&#39;</span><span class="ot">,</span>   <span class="st">&#39;new-unique-key-here&#39;</span><span class="ot">);</span></span>
<span id="cb17-8"><a href="#cb17-8" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;NONCE_SALT&#39;</span><span class="ot">,</span>       <span class="st">&#39;new-unique-key-here&#39;</span><span class="ot">);</span></span></code></pre>
</div>
<h3 id="install-security-plugin">Install Security Plugin</h3>
<div class="sourceCode" id="cb18">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true"></a><span class="ex">wp</span> plugin install wordfence --activate</span></code></pre>
</div>
<p>Configure:</p>
<ul>
<li>Enable Web Application Firewall</li>
<li>Schedule daily scans</li>
<li>Enable two-factor authentication</li>
<li>Set up email alerts</li>
</ul>
<h3 id="harden-file-permissions">Harden File Permissions</h3>
<div class="sourceCode" id="cb19">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true"></a><span class="fu">find</span> . -type d -exec chmod 755 {} <span class="dt">\;</span></span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true"></a><span class="fu">find</span> . -type f -exec chmod 644 {} <span class="dt">\;</span></span>
<span id="cb19-3"><a href="#cb19-3" aria-hidden="true"></a><span class="fu">chmod</span> 440 wp-config.php</span></code></pre>
</div>
<h3 id="disable-file-editing">Disable File Editing</h3>
<div class="sourceCode" id="cb20">
<pre class="sourceCode php"><code class="sourceCode php"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true"></a><span class="co">// Add to wp-config.php</span></span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true"></a><span class="fu">define</span><span class="ot">(</span><span class="st">&#39;DISALLOW_FILE_EDIT&#39;</span><span class="ot">,</span> <span class="kw">true</span><span class="ot">);</span></span></code></pre>
</div>
<h2 id="removing-site-from-blacklists">Removing Site from Blacklists</h2>
<h3 id="google-safe-browsing">Google Safe Browsing</h3>
<ol type="1">
<li>Log into <a href="https://search.google.com/search-console">Google Search Console</a></li>
<li>Check Security Issues section</li>
<li>Fix all issues identified</li>
<li>Request a review</li>
</ol>
<h3 id="malware-databases">Malware Databases</h3>
<p>Check and request removal from:</p>
<ul>
<li>Norton Safe Web</li>
<li>McAfee SiteAdvisor</li>
<li>Yandex Safe Browsing</li>
<li>PhishTank (if phishing was involved)</li>
</ul>
<h2 id="post-recovery-monitoring">Post-Recovery Monitoring</h2>
<h3 id="set-up-file-integrity-monitoring">Set Up File Integrity Monitoring</h3>
<div class="sourceCode" id="cb21">
<pre class="sourceCode php"><code class="sourceCode php"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true"></a><span class="co">// Wordfence monitors this automatically</span></span>
<span id="cb21-2"><a href="#cb21-2" aria-hidden="true"></a><span class="co">// Or use custom solution</span></span>
<span id="cb21-3"><a href="#cb21-3" aria-hidden="true"></a><span class="kw">$files</span> = get_option<span class="ot">(</span><span class="st">&#39;file_hashes&#39;</span><span class="ot">);</span></span>
<span id="cb21-4"><a href="#cb21-4" aria-hidden="true"></a><span class="kw">$current</span> = <span class="fu">md5_file</span><span class="ot">(</span><span class="st">&#39;wp-config.php&#39;</span><span class="ot">);</span></span>
<span id="cb21-5"><a href="#cb21-5" aria-hidden="true"></a><span class="kw">if</span> <span class="ot">(</span><span class="kw">$files</span><span class="ot">[</span><span class="st">&#39;wp-config.php&#39;</span><span class="ot">]</span> !== <span class="kw">$current</span><span class="ot">)</span> {</span>
<span id="cb21-6"><a href="#cb21-6" aria-hidden="true"></a>    <span class="co">// Alert administrator</span></span>
<span id="cb21-7"><a href="#cb21-7" aria-hidden="true"></a>}</span></code></pre>
</div>
<h3 id="monitor-for-reinfection">Monitor for Reinfection</h3>
<ul>
<li>Daily malware scans for 30 days</li>
<li>Review server logs weekly</li>
<li>Monitor traffic for unusual patterns</li>
<li>Check for new unauthorized users</li>
</ul>
<h3 id="ongoing-security-maintenance">Ongoing Security Maintenance</h3>
<p><strong>Weekly:</strong></p>
<ul>
<li>Review security scan results</li>
<li>Check for unauthorized changes</li>
<li>Monitor failed login attempts</li>
</ul>
<p><strong>Monthly:</strong></p>
<ul>
<li>Update all plugins and themes</li>
<li>Review user accounts and permissions</li>
<li>Audit file permissions</li>
</ul>
<p><strong>Quarterly:</strong></p>
<ul>
<li>Full security audit</li>
<li>Password rotation</li>
<li>Review and update security policies</li>
</ul>
<h2 id="prevention-checklist">Prevention Checklist</h2>
<p>After cleanup, implement these to prevent future hacks:</p>
<p>✅ Keep WordPress, plugins, and themes updated ✅ Use strong, unique passwords ✅ Enable two-factor authentication ✅ Install security plugin with firewall ✅ Regular automated backups (off-site) ✅ Limit login attempts ✅ Disable file editing in wp-admin ✅ Use HTTPS site-wide ✅ Regular security scans ✅ Monitor file integrity</p>
<h2 id="when-to-hire-professionals">When to Hire Professionals</h2>
<p>Consider professional malware removal if:</p>
<ul>
<li>Multiple cleanup attempts have failed</li>
<li>You lack technical expertise</li>
<li>Site contains sensitive customer data</li>
<li>Reinfection keeps occurring</li>
<li>You need guaranteed malware-free certificate</li>
</ul>
<p>Professional services (Sucuri, Wordfence Care, etc.) typically cost $200-$500 but include:</p>
<ul>
<li>Complete malware removal</li>
<li>Backdoor elimination</li>
<li>Security hardening</li>
<li>Blacklist removal</li>
<li>Reinfection guarantee</li>
</ul>
<p>Recovery from a hack is stressful, but following this systematic approach ensures complete cleanup and significantly reduces the risk of future compromises.</p>
<h2 id="external-links">External Links</h2>
<ol type="1">
<li><a href="https://sitecheck.sucuri.net/">Sucuri SiteCheck Scanner</a></li>
<li><a href="https://www.wordfence.com/products/wordfence-scan/">Wordfence Scan</a></li>
<li><a href="https://search.google.com/search-console">Google Search Console</a></li>
<li><a href="https://wordpress.org/support/forum/hacks/">WordPress Support Forum</a></li>
<li><a href="https://www.virustotal.com/">VirusTotal File Scanner</a></li>
</ol>
<h2 id="call-to-action">Call to Action</h2>
<p>Secure your site with bulletproof backups! <a href="https://backupcopilotplugin.com/">Backup Copilot Pro</a> offers automated security audits, malware scanning before backups, and instant recovery—try it free!</p>
<p>The post <a href="https://developryplugins.com/how-to-fix-hacked-wordpress-site-complete-recovery-guide/">How to Fix Hacked WordPress Site: Complete Recovery Guide</a> appeared first on <a href="https://developryplugins.com">Developry Plugins</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
