DEV Community


How To Create Symlink For Laravel Website

Like to learn something new. Coding is fun.
Originally published at ・1 min read

The process to create a symlink for laravel app in cPanel is simple.

Just create a file and fill it, then run it. And you are done. You will see a storage folder in the public folder(wherever you like to create a symlink).

  1. Name the file whatever. Like here we call it "symlink.php"
  2. Now fill the file with these.
symlink('/home/.../', '/home/.../');
Enter fullscreen mode Exit fullscreen mode
  1. Run this file. Just call the file in your browser address bar.

Ex. Call or

Suppose the "Classific" is the new subdomain and the folder. So, you will tell which folder should be created a copy(symlink). Make sure you have entered the correct path.

Basically you are saying in this file.
symlink('from_folder', 'to_folder');

Discussion (0)