How Does WordPress Gets Hacked? Don’t Panic, Use 10 Best Step Guide To Recover.

WordPress gets hacked in so many different ways. But if you want to know more about how WordPress sites get hacked (and you aren’t rushing ahead to the steps to take if your site has been hacked), here are the main routes hackers take to get into your site:

The number of hacks and phishing campaigns has been causing a lot of pain lately. Hackers are trying to get around the latest security measures, and they’re using automated methods to make it happen. These automated attacks include brute-forcing logins, script kiddies, and other hackers.

Malicious redirects – when backdoors are used to add malicious redirects to your site. Cross-site scripting – is the most common vulnerability found in WordPress plugins; these inject scripts that allow a hacker to send malicious code to the user’s browser.

Denial of service is when a hacker uses their error to overload the system, preventing others from using it and thus making them useless to the user. It’s best to make sure you’re following our guide to preventing eCommerce fraud.

You must take the proper steps to protect your WordPress site against hackers, so let’s work through the steps you need to take when your site is hacked.

WordPress Site Hacked: What to Do(Step-By-Step Guide)

Unfortunately, you were hacked because you should make sure you’re protecting your WordPress site if you’re not already doing so. You may be able to fix it yourself, but if you’re not confident in your ability to resolve the issue, we highly recommend that you contact us for assistance.

Your step will depend on how your site has been hacked. You may not have to work through all of these. The steps we’ll go through are: Don’t panic. Put your site in maintenance mode.

Reset your password. Use the Kinsta Malware Removal Service. Update plugins and themes. Remove users. Remove unwanted files. Clean out your sitemap. Reinstall plugins and themes. Reinstall WordPress core. Clean out your database.

WordPress Site Hacked: What to Do(Step-By-Step Guide)

Step 1: Don’t Panic

WordPress gets hacked, Don't Panic
Photo by SHVETS production on

To avoid falling into the trap of saying “Don’t panic” when someone is panicking, we should first understand the difference between panic and fear. The difference is that fear involves action while panic involves inaction.

The main thing is not to have your site available for the general public. If you think that the current status of your site might be temporary, put it in maintenance mode and leave it for a few hours until you’re feeling calmer.


Step 2: Put Your Site in Maintenance Mode

WordPress gets hacked, Don't Panic

If you can’t log in to your WordPress site right now, this won’t be possible, but come back and do this when you can. A plugin like “Coming Soon Page & Maintenance Mode” will let you put your site into maintenance mode, making it look as if it’s undergoing scheduled maintenance rather than being fixed after a hack.

It’s much easier to break a site than to fix it.


Read more: Top 12 best WordPress plugins for travel websites

Step 3: Use BlogSetupTutorial Expert Malware Removal Service

I have an expert in malware removal Services; You can get support by contacting me on the contact us page. 

Step 4: Reset Passwords

Step 4: Reset Passwords Since you don’t know which password was used to gain access to your site, it’s important to change all of them to prevent the hacker from using them again. It’s not confined to your WordPress password, your SFTP password, your database password, and your password with your hosting provider either.

You should also ensure that other admins reset their passwords too.

Step 5: Update Plugins and Themes

The final step is to update all of your plugins and themes to the latest version. Go to your site’s Dashboard > Updates in order to complete this task.

Step 6: Remove Users

It’s time to remove the WordPress users you don’t recognize. Make sure any authorized administrators haven’t changed their login details, or you don’t recognize them.

Go to the Users page in your WordPress admin and click the User link above the list of users. If there are any users there who shouldn’t be, click the checkbox next to them, then select Delete the Bulk Actions drop-down list.

Step 7: Remove Unwanted Files

Suppose your site isn’t secured with a security plugin, and you’ve not been notified by Sucuri that there are any problems with your site. In that case, we advise you to download the latest version of Sucuri’s WordPress Security Suite, which you can download here: https://www.sucuri.

Step 8: Clean Out Your Sitemap and Resubmit to Google

Step 10: Clean Out Your Sitemap and Resubmit to Google Another reason for a website being blocked by search engines is the sitemap being infected with foreign characters. In one case we fixed at Kinsta, a sitemap had been infected with spurious links and foreign characters.

Regenerate your sitemap using your SEO plugin but also tell Google to crawl your site with the “asitemap.xml.” Add your site to Google Search Console and submit a sitemaps report with Google to tell them you need the site to be crawled.

This doesn’t guarantee that your website will be crawled immediately and can take up to two weeks. You can’t do anything to speed this up, so you have to be patient.

Step 9: Reinstall Plugins and Themes

Re-activate Plugins and Themes If your site still has problems, you’ll need to re-activate any plugins and themes that you haven’t already updated. Deactivate and delete them from your Theme and Pluginspages, and re-activate them.

If you didn’t already put your site into maintenance mode, do that first. If you bought a plugin or theme from a plugin or theme vendor and aren’t sure how secure it is, now is the time to consider whether you should continue using it.

If you’re downloading a free theme/plugin from anywhere other than the WordPress plugin or theme directories, don’t install it. Instead, install the legitimate version from the official source or buy the legitimate version.

If you can’t afford it, you should go for the cheapest theme or plugin that does the same thing or does the same job. If this doesn’t fix the problem, check the support pages for all of your themes and plugins.

Other users may be experiencing problems, and you should try to uninstall that theme or plugin until the vulnerability is fixed.

Step 10: Reinstall WordPress Core

It’s important to reinstall WordPress itself after you’ve done this. If the files in the WordPress core have been compromised, you’ll need to replace them with a clean WordPress installation. To do this, upload a clean set of WordPress files to your site via SFTP, overwriting the old ones.

I’ve installed WordPress several times myself. I’m not sure why it overwrites the wp-config.php and .htaccess files. That’s usually why people have problems. It may not actually do anything, but I would suggest using an auto-installer if it doesn’t work.

There are two main ways to do this: either you can FTP the files manually or upload them through the website itself (we have a built-in form for uploading files, so you click that button, and the file is uploaded).

Step 11: Clean Out Your Database

Clean out Your Database.Your site has been hacked, and you’ll need to clean that out. It’s a good idea to clean out your database as a clean database will have less stale data and take up less space, making your site faster.

If you’re using a security plugin or service or running your checks, you can see if your database has been hacked by running a scan via that.

Or use the WP-Optimize plugin to scan your database and remove any plugins that aren’t needed, and optimize your database for the future.

Finally, Thank you for reading this article, and I can Think that your problem will be resolved. If not, you are free to contact my team.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.