I cannot access my main site after trying to install discourse

The Support > WordPress category is for support with the WP Discourse plugin, so I’ve re-categorised this.

You have managed to get into a bit of a pickle! At the risk of pointing out the obvious, the solution will depend on how your server is configured, what commands you’ve run and what files you’ve changed.

I understand that the precipitating cause of this was your attempt to install Discourse, but your request here is not really Discourse-related, it’s more about how you’ve configured your server. That said, if I were in your position I would break down the problem into pieces:

  1. What’s using what ports? Is your wordpress webserver serving on port 80? You can use netstat to figure that out.

    sudo netstat -tulpn
    
  2. Is your webserver (i.e. nginx) correctly pointing to your wordpress files (probably in /var/www/html) ?

  3. Is your SSL certificate valid and properly configured?