What is the best practice approach to set up a Wordpress site with a Discourse Community subdirectory, from scratch?

August 11, 2018 826 views
LEMP WordPress

I'm starting from scratch and have read dozens of tutorials and am trying to figure out the best approach for a novice to build a WP site with Discourse on the same droplet.... With WP as the main domain, and Discourse as a subdirectory (not a subdomain, if possible - just like the community is set up here on DO with a /community). I also want to make sure i'm not missing any critical components like security or thinking about scaling this site, into the future.

Here's some things I want to make sure I get right... out of the gate:

  1. I want to be sure that I'm adding the proper layer of security
  2. I want to make sure I am setting up the DNS properly for these two diff tools
  3. I want to make sure my SSL certs are in place for both tools (or maybe I only need for the main domain ¯_(ツ)_/¯ )
  4. I've read a bit about caching and I want to make sure that's set up to optimize the UX

From what I've looked up, here's the process I'm looking at following:

  1. Create a new Droplet
  2. Install and Deploy a LEMP stack - should I use this 55 second method? https://www.digitalocean.com/products/one-click-apps/lemp/
  3. Then I was thinking that I should set up 2 Server blocks (or Virtual Hosts) as outlined here in the "How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04" guide: https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04
  4. Then install Wordpress on one server block?
  5. Then install Discourse on another server block?
  6. Then what?

My trouble is that there is sooooo much great info (tutorials) in these forums/documentation but I don't know which documentation to follow, in which order... b/c I couldn't figure out the best order of operations here.

PS. I'm understanding most of what I'm reading as I've been learning about the LEMP stack and NGINX, etc. but I don't have any expereince with backend development. I have a moderate to advanced understanding of HTML and CSS and a theoretical understanding of Javascript... but that's it!

Would I do well to install and run this stuff through a WHM/cPanel?

1 Answer

Based on the comment in this thread, from the Discourse co-founder Jeff Atwood, it sounds like the best practice would be to have Discourse set up as a subdomain instead of a subdirectory (folder).

So anyone answering the question above, please consider the question in the context of having Wordpress on the main domain and Discourse as a subdomain.

Have another answer? Share your knowledge.