Get All 122 Premium WordPress Themes for Just $59.99
One-Time Payment: Unlimited Use Across Unlimited Domains, Plus Free Lifetime Updates!

Create Symlink in Linux Terminal

Symlinks (also known as ‘symbolic’ or ‘soft’ links) are special type of files which reference to another folder or file.

Here is how to create a symlink from Linux terminal:

Open Linux Terminal (Ctrl + Alt + T) and run the following command:

$ ln -s original_file_path new_symlink_file_path

Then you can verify the create soft link by running the following command:

$ ls -l original_file_path new_symlink_file_path

Here is an example:

Assume we have a git repository for a WordPress Plugin (/home/tishonator/tishonator_git/plugins/fancy-slider) where we store its files and we have a local WordPress installation.

In order to be able to use the plugin on local WordPress site, we need to upload plugins files to /var/www/html/wp-content/plugins/fancy-slider

Instead of copy-paste files, we can create a softlink on WordPress plugins folder which is a reference to the git repository folder:

$ ln -s /home/tishonator/tishonator_git/plugins/fancy-slider /var/www/html/wp-content/plugins/fancy-slider

Leave a Reply