/ 1 min read

Find the Root Path to your Hosting

Sometimes you just need the root path, for whatever reason. If you can’t get it you can create a php file and include the following lines.

 echo $_SERVER['DOCUMENT_ROOT']; ?>

if you them browse to the file you created in your browser you will see the root path.

Robert Went

Freelance PHP developer with 19+ years experience, specialising in technical SEO, WordPress, and Laravel.

More about Rob