Is it hopeless for my site if I deleted wp-config php in Wordpress hosted in bitnami in google cloud? I m real crying

Keywords: General - Google Cloud Platform - Technical issue - Other
Description:
Non tech crying issue:
I first get error 500 and so I YouTube learn to use new config will help than I delete the wp config file … Is it hopeless for my site if I deleted wp-config php in Wordpress hosted in bitnami in google cloud? I m real crying.

My site( I self learn for months in covid for this baby as I m not a tech person) https://www.feelings-inc.com

What I got now(I keep finding solution from google but I m not their big client so no way out) :
Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file to your WordPress installation.

I dunno how to change files in bitnami or Wordpress or google cloud will help now…

Ps: using Mac OS for this woocommerce site.
Really appreciated any tech ppl can help me:(
I tried so hard self learn n i dun want to give up in pandemic to earn a living by this for my family…:((((( I m real crying…

Hi @anneyipstudio,

I’m sorry to hear that. Let’s try to recover the site, I’m sure you can do it :slight_smile:

  • First of all, I suggest you create a backup of the site so you can recover the info in case something more goes wrong.

https://docs.bitnami.com/google/faq/administration/backup-restore-server/

Note: I understand you do not have a previous backup of the instance, right?

  • Then, let’s copy the wp-config.php file from another Bitnami WordPress installation (you can launch a new instance in the cloud or deploy the Virtual Machine in your local computer). You will need to create the file at /opt/bitnami/apps/wordpress/htdocs/wp-config.php and paste the file’s content.
  • Set the correct permissions
sudo chmod 644 /opt/bitnami/apps/wordpress/htdocs/wp-config.php
sudo chown bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/wp-config.php
  • Then, try to access the application again. If you get an database-related error, let’s try to update the database’s password
  1. Get the database’s password from the wp-config.php file
cat /opt/bitnami/apps/wordpress/htdocs/wp-config.php | grep DB_PASSWORD
  1. Update the database’s user’s password
mysql -u root -p -e "ALTER USER 'bn_wordpress'@'localhost' IDENTIFIED BY 'PASSWORD-FROM-STEP-1-HERE';

Note: The command will ask you for the mysql’s root password now. It’s the same we configured when you booted the machine for the first time.

  • Try to access the application again.

Happy to help!


Was my answer helpful? Click on :heart:

Your answer was quite helpful. You have explained every point in high details.

Hi @angelinahellworld,

I’m glad to hear that :slight_smile:

Enjoy!