We use different low-budget hosting for saving money. But due to this low secure hosting server and weak firewall system; Viruses/malware could easily get access to our site.
As a result, our site got hacked, or sometimes google gives a manual penalty to our site. and everything will go down to zero.
By following this 1 method you could save your site from almost 90% of attacks.
- Step 1:
![](https://ayonchy.com/wp-content/uploads/2022/11/1-wp-config.png)
See, when we remain to open our plugin section. It looks something like that. Mean any expert could get access my site through the plugin section. He/she can inject viruses/malware into any weak plugin or outdated plugin. And then get access to the whole of my site.
How Could I Stop That?
- Step 2:
![](https://ayonchy.com/wp-content/uploads/2022/11/2-config.png)
Go to Cpanel and then public_html.
![](https://ayonchy.com/wp-content/uploads/2022/11/3-config.png)
Go on wp-config and right-click and (edit).
![](https://ayonchy.com/wp-content/uploads/2022/11/6-config.png)
Generally, you don’t find this code there. Just put it there. I am providing this here.
Then save this. And you are done.
![](https://ayonchy.com/wp-content/uploads/2022/11/5-config.png)
And see now when you hover over to the plugin section. Then you cannot update or add a new plugin.
But if you need to add or update the plugin then just add // before define it like this.
![](https://ayonchy.com/wp-content/uploads/2022/11/4-config-1.png)
Then everything will be like before.
Now you are 90% safe. 🙂
If you think your site is already got affected then hire me.
2 replies on “How To Save Your Website Being Inject From Virus/Malware Through Plugin”
What To Do When My Website Gets Hacked With Japanese Keywords? - Ayon Chowdhury May 8, 2023 at 1:11 pm
[…] Related: How To Save Your Website Being Inject From Virus/Malware Through Plugin […]
How To Add Ads.TXT File In WordPress Without Plugin? - Ayon Chowdhury June 7, 2023 at 6:29 pm
[…] Related: How To Save Your Website Being Inject From Virus/Malware Through Plugin […]