First, I think this question might get better answers on StackOverflow.com as it sounds related to software development and programming, not specifically Ubuntu or Debian systems.
To find the absolute path of the code base really depends on what the deployment mechanism is for the application. For example, a simple deployment mechanism might do a git clone
operation or unzipping of a tar.gz
file to a specific directory. If that is done, you have your absolute path just by looking at the destination.
I'll also say, as a common practice with PHP apps, the root codebase is often either the directory where index.php
is located, or the parent directory of that. Not always, but I'd say 95% of use cases (depends on what framework).