[HELP] Automatically delete wp-config.php file in WordPress

zara

Active member
Trusted Uploader
Mar 31, 2019
331
166
43
Need help..!
There is a site it works fine in the past, but today it gets some behavior that was site automatically redirected to domain/wp-admin/setup-config.php
So, I have logged in to Cpanel and check the public_html folder there is no wp-config.php file. it is gone. how it is possible?
After that, I make a new user and edit wp-config-sample.php file and input new credentials and database suffixes. and after I deleted the sample PHP file. all is fine. but now that site not loading at all. it shows HTTP ERROR 500 error. Please help me to solve this.

In today I have checked my site URL, I saw in Cpanel there is missing the wp-config.php file again. How this is possible? I think used theme on this website is nulled. Please help me to solve this

Thank you
 

prasad0889

Well-known member
Trusted Seller
Trusted Uploader
Jan 18, 2019
543
312
63
India
Hi,
It must be very frustrating. I would recommend that you restore the file for now.
Follow these steps so you can actually pinpoint the files that are damaged.
Steps:
  1. Install the WordFence Plugin.
  2. Put the website for a FULL Scan.
  3. It will show you a list of files which it thinks are hacked or contains malicious code.
  4. Repair the files directly or manually.

Do not deactivate the WordFence plugin for a few days and check if the process repeats. If this happens again, will need to dig deeper to find the solution. It may be your hosting environment is not secure, just a guess for now. Do comment on your findings.
 
  • Like
Reactions: zara

zara

Active member
Trusted Uploader
Mar 31, 2019
331
166
43
Hi,
It must be very frustrating. I would recommend that you restore the file for now.
Follow these steps so you can actually pinpoint the files that are damaged.
Steps:
  1. Install the WordFence Plugin.
  2. Put the website for a FULL Scan.
  3. It will show you a list of files which it thinks are hacked or contains malicious code.
  4. Repair the files directly or manually.
Do not deactivate the WordFence plugin for a few days and check if the process repeats. If this happens again, will need to dig deeper to find the solution. It may be your hosting environment is not secure, just a guess for now. Do comment on your findings.

I changed my host server, after installed WordPress manually and uploaded wp-content folder seems everything is okay. Thank you for your help. and I was activated WordFence Plugin
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu