Sub-directory setup


#1

One of the most common setups is a blog in a sub-directory. Example.com + Example.com/blog. In our case, we run wordpress for both example.com and the blog in the subdirectory.

Since cloudways do not allow installation of one app within another app in a sub-directory, we ran into some issues and would love to hear what others say:

  1. How to clone in a click such an app running in a sub-directory? Will one click cloning the main app include the subdirectory app files?
  2. Domain management? (Do we input Manually in wordpress vs GUI?)
  3. Cron job management? (Any conflict between main app vs sub-directory app and any possible GUI for sub-directory?)
  4. One click restore, GIT and cloudways CDN implementation process for apps running in sub-directory?
  5. Only shared FTP credentials are possible to use as it seems FTP credentials are generated per app basis?
  6. Will redis conflict in this sub-directory structure?
  7. Will one click backup/restore work? (We fear overwriting of the subdirectory files?)
  8. We lose big time control over varnish , PHP and general settings (basically the application settings tab). Eg: If we switch off varnish for example.com then example.com/blog will lose varnish too as the varnish config files are saved per application basis? How do we tweak specific PHP settings in sub-directories if needed?

In short, subdirectory apps lose the benefit of easy management and a lot of control?

Any thoughts about how others managed to resolve the above?

Cloudways team members hopefully can pitch in a bit as we intend to write a blog from our own experience with cloudways setup to help other future users :wink:

Thanks


#2

Well, you could always manually install anything inside a subdirectory - Cloudways won’t stop you from doing that. But of course you wouldn’t have access to Cloudways’ management options for things installed this way.

If you choose to do so, then every action (backup/restore/migration/clonin) will include everything - that is, the main app, and the subdirectory apps. Same with configuration options. In this scenario, you really won’t be able to manage them separately.

In any case, why not use subdomains? I heard it’s good for SEO (as it counts as a different domain).

Also, you could always set up a redirect from example.com/blog to blog.example.com


#3

Subdomains in this type of situation are terrible for SEO, unfortunately - you get the worst of both worlds. The subdomain inherits very little of the main site’s authority, and it is very limited in the amount of its own authority it can pass back to the primary domain. Absolutely not recommended.


#4

Sub-domains do not inherit authority and google treats them as 2 different sites all together. Hence, for sure we have to go sub-directory which brings us back to the main question, how do we in cloudways implement the solutions specially when cloning, configuration and backup etc might end up mixing and causing issues!

Thanks for confirming what we were observing :slight_smile:


#5

Spot on :slight_smile: We choose sub-director to pass on the blog reach to main domain which is quite a very common strategy in the SEO world :slight_smile: