SSH'd into Wordpress Droplet a 2nd time and now Wordpress website isn't working

September 21, 2019 296 views
PHP WordPress DigitalOcean

Hi there,

I went through the process of setting up my Wordpress website using the official 18.04 wordpress image. I was able to log into my droplet which activated the script /opt/digitalocean/wp_setup.sh

It said “This setup requires a domain name. If you do not have one yet, you may cancel this setup, press Ctrl+C. This script will run again on your next login”

I skipped this and proceeded with the rest of my setup. Everything worked great and I was able to set an admin password and login to the http://my_website_name.com/wp-admin/install.php

I decided to login to my droplet via SSH today and I was prompted with the same script (/opt/digitalocean/wp_setup.sh) and I canceled it again. However, this time I noticed the following message:

mv: cannot stat '/var/www/html': No such file or directory
mv: cannot stat '/var/www/wordpress': No such file or directory

When I went to my website it was down and I can’t get it back up.

I tried restart apache but I believe that the script running a second time may have messed something up, particularly these lines in the script:

mv /var/www/html /var/www/html.old
mv /var/www/wordpress /var/www/html

Any advice?

Thank you.

2 Answers

Hello,

What I would suggest here is:

  • SSH to the droplet

  • Then check the content of the /var/www/ folder:

ls -l /var/www
  • If you see the /var/www/html.old folder there, just put it back in its initial place.
mv /var/www/html.old /var/www/html

Then test your site again.

Another thing that you could also check is if there are any issues with your Apache’s configuration, to do that just run an Apache config test and make sure that you get Syntax OK message:

apachectl -t

If you are still unable to get the site up, just share the content of the /var/www/ folder here and also the output of the apache config test along with your apache configuration file. Then I should be able to advise you further.

Regards,
Bobby

  • Hi Bobby. Do you work for Digital Ocean? I ran into this issue yesterday aswell, slightly panicking before realizing it was just moved to html.old and the database still was intact.

    This bug should be fixed. I’ve yet to establish my domain name, and I dont want to go through the process of moving files every time I have to ssh into my server. Can someone on your team fix it, or is there any way you can report this issue to the correct people?

Fantastic. Problem solved.

Thanks @bobbyiliev

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!