Adding New or Multi-Store in Magento using Symlinks or Symbolic Links Part 2

Are you having a problem on creating symbolic links when adding a new store in Magento? Or in whatever purpose, this concept is somehow similar and I think beneficial for your future projects.

I assume that you already know how to access your Shell or SSH Access using Terminal (MAC) or Putty software.

Common problems on creating symlinks are usually caused by syntax error on command line-interface, incorrect file patch to the server, and incorrect commands.

If you can see this similar command line when browsing any tutorials via the internet like what you can see below

ln -s ../public_html/app ./app

This is actually an incorrect file path from the server.

ln the command line stands to creating links – files which “point” to other files or directories in the filesystem.

Thus, the command line should look like this

ln -s existingPath pointingtoExistingPath

existingPath literally means that this path or folder is existing and pointingtoExistingPath is the path in which your symlinks or symbolic links will be created.

So to be exact, your symlinks command will look like this

ln -s /home/username/public_html/app /home/username/public_html/Newstore/app

Username is usually the username you used when accessing your cPanel
Newstore folder and app subfolder will be automatically created when you provide a correct path.

To check if you are accessing the correct path, just type

ln /home/username/public_html/app

and you will get this similar message

“hard link not allowed for directory”

Finally we hopefully derived a correct command line/path

ln -s /home/username/public_html/app /home/username/public_html/Newstore/app
ln -s /home/username/public_html/errors /home/username/public_html/Newstore/errors
ln -s /home/username/public_html/includes /home/username/public_html/Newstore/includes
ln -s /home/username/public_html/js /home/username/public_html/Newstore/js
ln -s /home/username/public_html/lib /home/username/public_html/Newstore/lib
ln -s /home/username/public_html/media /home/username/public_html/Newstore/media
ln -s /home/username/public_html/skin /home/username/public_html/Newstore/skin
ln -s /home/username/public_html/var /home/username/public_html/Newstore/var

Using Filezilla client, you can check whether you have successfully created symlinks or symbolic links. See the attached image.
symbolic links magento

So play to it, this will not generally harm your files, but of course, do a backup first. Just be careful of deleting of selecting “Follow symlink, delete target directory contents“, just select “Delete symlink”.
symbolic link warning

I hope this will also work at your end.

Final note, I will provide you a complete tutorial this week..

Elvin is one of the contributors of He has been creating Wordpress Plugins, Magento Extensions, & Mobile Applications. If you find this article useful, please Follow him on .
About Elvin D.

One thought on “Adding New or Multi-Store in Magento using Symlinks or Symbolic Links Part 2”

Leave Your Thought