Lost my Wordpress site running commands in SSH terminal

Keywords: WordPress - AWS - Technical issue - Connectivity (SSH/FTP)

bndiagnostic ID: 1fab86f2-9c99-ad19-636e-8e440be4cc3c

bndiagnostic output:

? Apache: Found possible issues
? Wordpress: Found possible issues

bndiagnostic failure reason: The tool could not find any issue

I was having issues with uploading files to my wordpress site via FTP. In an effort to correct this issue, I was running commands in the SSH terminal following suggested solutions posted in the forums. I ran the following commands:

sudo chown -R bitnami:daemon /bitnami/wordpress
sudo chmod 666 /bitnami/wordpress

Upon running those two commands, I lost front end and back end access using web browser. “Forbidden - You don’t have permission to access this resource”. At this point I started to panic, and I came to the message boards to ask for help, but the bitnami diagnostic tool would not upload or provide me a proper ID to make a post.

I looked for another solution to reverse my mistake and I came across the following post:


From the article, I ran the following commands in the SSH terminal:

sudo chown -R bitnami:daemon TARGET
sudo find TARGET -type d -exec chmod 775 {} ;
sudo find TARGET -type f -exec chmod 664 {} ;
sudo chmod 640 TARGET/wp-config.php

Now, I’ve lost my whole site! I’m in desperate need of some help in reversing this chain of events and hopeful for some kind of recovery. I’m in way over my head and I could really use some help. Thank you.

Small clarification on the second set of commands in my last post… the TARGET was /opt/bitnami/wordpress

sudo chown -R bitnami:daemon /opt/bitnami/wordpress
sudo find /opt/bitnami/wordpress -type d -exec chmod 775 {} ;
sudo find /opt/bitnami/wordpress -type f -exec chmod 664 {} ;
sudo chmod 640 /opt/bitnami/wordpress/wp-config.php

Another update and clarification:

On the site FTP I see that /opt/bitnami/wordpress is still populated with my site files, however, I’m unable to access the wp-content folder (“permission denied”). On the other hand (and possibly unrelated), there are no files in the /bitnami/wordpress folder.

On the front end when I try to access the site I get the following:

  • The theme directory “qualis-child” does not exist.
  • Error: The themes directory is either empty or doesn’t exist. Please check your installation.

I hope this information is clear and can help with the solution. A massive thank you to anyone who is able to help.

Hi @arisnfs ,

You can reset the WordPress permissions by running the commands of this post