Today, I am sharing knowledge about how do we use Symbolic Links or Junctions Points in our Magento Store. If you have windows server or windows environment and you are working for Magento 2.0 multi stores then you might be facing an issue to make the link(s) among directories. Without making link amount directories, you are inaccessible for website theme / files.

For this purpose, we link directory/files using Symbolic Links or Junctions points. For Symbolic Links or Junctions points, we use different commands to mklink as bridge/shortcut for source and destination links. Command syntax is given below:

Command Syntax:

mklink [[/D] | [/H] | [/J]] Link Target


Create Junctions Links for Windows Server or localhost(CMD Line):
select the folder and mklink (Example for XAMPP Server):


mklink /J D:\xampp\htdocs\WebSite\store1\app D:\xampp\htdocs\WebSite\app
mklink /J D:\xampp\htdocs\WebSite\store1\lib D:\xampp\htdocs\WebSite\lib
mklink /J D:\xampp\htdocs\WebSite\store1\pub D:\xampp\htdocs\WebSite\pub
mklink /J D:\xampp\htdocs\WebSite\store1\var D:\xampp\htdocs\WebSite\var


mklink /J D:\xampp\htdocs\WebSite\store2\app D:\xampp\htdocs\WebSite\app
mklink /J D:\xampp\htdocs\WebSite\store2\lib D:\xampp\htdocs\WebSite\lib
mklink /J D:\xampp\htdocs\WebSite\store2\pub D:\xampp\htdocs\WebSite\pub
mklink /J D:\xampp\htdocs\WebSite\store2\var D:\xampp\htdocs\WebSite\var

If you have any question then please query! Thanks