Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

What is: Absolute Path

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Sometimes referred to as the file path or full path, the absolute path is the location of a directory or file in a computer. It contains the root directory as well as all other sub directories that contain the file or directory. Paths are used extensively in operating systems to represent file and directory relationships. They are also necessary to the operation of the internet and form the basis of URLs.

In addition to absolute paths, there are also relative paths. These define the location of a file relative to your working directory, or the directory you are currently located in. Absolute paths use a root directory that is usually at the top of the file tree. This means that no matter what directory you are currently in you can always use this path to locate a resource on the system.

To give you some examples, in Linux and Unix based operating systems and web servers the absolute path usually starts with a forward slash /. Each directory is then separated by forward slashes.

Example:

/home/john/www/blog/index.php

In Microsoft Windows based operating systems and web servers it usually starts with a drive letter and is separated by backslashes.

Example:

C:\Windows\Users\john\html\docs\blog\index.php

On the internet, URLs follow the Unix convention of using forwards slashes to separate files and directories on servers.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

WPBeginner Assistant
How can I help you?

By chatting, you consent to this chat being stored according to our privacy policy and your email will be added to receive weekly WordPress tutorials from WPBeginner.