How to create a symbolic link in cPanel

Ever needed to create a symlink in cPanel? Well, cPanel itself doesn’t have any feature to work with symbolic links.

You just have to SSH into your server and execute the following command:

ln -s /path/to/target /path/to/shortcut

This will create a symbolic link for you.

What if SSH is not available? Unfortunately, FTP does not support creation of symbolic links.

There’re at least 3 more options you can try.

1. Set up a cron job in cPanel with the linux command mentioned above.

[alert]Don’t forget to delete the cronjob after the symlink is created. Failing to do this will result in unpredictable issues.[/alert]

2. Create a PHP script and run it in your browser. It will look like this:

<?php
$target = 'uploads.php';
$shortcut = 'uploads';

symlink($target, $shortcut);

echo readlink($shortcut);
?>

3. Create a support ticket and our engineers will help. This method always works :)


Was this article helpful?
Spread the word!