Creating a Symbolic Link in cPanel
cPanel doesn’t have features that work with symbolic links, so if ever a need to create a symlink arises, you’ll need to turn to alternatives to do so.
One way is to SSH into your server and execute this command:
ln -s /path/to/target /path/to/shortcut
Doing so will create a symlink for you.
In case SSH is unavailable, you can’t turn to FTP as it doesn’t support creation of symbolic links either.
There are 3 other options to try:
- Set up a cron job in cPanel using the above-mentioned command.
- Create a PHP script to run in your browser. This is what it will look like:
[su_note note_color=”#ffa6bd”]Don’t forget to delete the cronjob after the symlink is created. Failing to do this will result in unpredictable issues.[/su_note]
<?php $target = 'uploads.php'; $shortcut = 'uploads'; symlink($target, $shortcut); echo readlink($shortcut); ?>