1. Home
  2. Account Control Center
  3. Symbolic Link: What it is and How to Use It with Web Hosting

Symbolic Link: What it is and How to Use It with Web Hosting

Shared

VPS

Dedicated

WP Professional

WP Professional Plus

A symbolic link creates a file in your directory and acts as a shortcut to a file or folder. 

For example:  I have a directory- let's say example.com. However, I want a shortcut to another directory within the example.com. To do this, you would create a symbolic link. 

The symbolic link shows up as a link within the directory. It will appear with a curved arrow icon to its left.symbolic link image

After it's been created, you can click on the symbolic link's file path in the directory to quickly navigate to a new location.link location image

WP Enthusiast accounts do not have an accessible file system in the ACC, so this tutorial cannot be used with WP Enthusiast accounts.

You can create a symbolic link directly in the Account Control Center (ACC). To do so, follow these steps:

    1. Log in to your Account Control Center (ACC)
    2. In the left sidebar, click Files
    3. In the drop-down, click the directory you wish to visit. You can choose between:
        • Home
        • Web
        • FTPdirectory image
    4. Once in your directory of choice, navigate to the location where you wish to place the symbolic link.

      For example, if you want your symbolic link in a sub directory named Example, then you should open the Example directory before completing the next steps.
    5. In the top navigation bar, click the Create Link buttoncreate link button image
    6. On the next page, double check the Current Directory file path and make sure it is correct. This is the file path to the location where the symbolic link will be placed.link fields image
    7. Next, fill out the fields:
      Source Filename This should be the file path to the new location you want the symbolic link to link to.
      Link Filename This is a nickname for the symbolic link so that you can easily identify it. 
    8. Once the fields have been filled out, click the Make Symbolic Link button

The new symbolic link will appear in the directory where you placed it.symbolic link image

If you prefer to use terminal or command prompt to create a symbolic link, you can do that, too. To do so, follow these steps:

  1. Connect to your hosting account via SSH
  2. Use ls and cd to navigate to the directory where you would like the symbolic link to be placed

    Helpful Hint

    ls will return a list of files in your current location
    cd [file name/file path] will take you to the file or file path you entered.

    For more information about ls and cd, see this beginner resource.

  3. Once there, run the command:

    ln -s [source-filename] [link-filename]

command image

Replace [source-filename] with the file or folder you want to link to and the [link-filename] with what you want to name the link. 

For example, this could look like:

ln -s usr/home/username/public_html/directory1 MyNewSymlink

This will create a symbolic link in your current location. 

Updated on January 7, 2020

Was this article helpful?

Related Articles