{"id":1380,"date":"2019-02-08T10:36:06","date_gmt":"2019-02-08T10:36:06","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2019\/02\/08\/1583694-how-to-create-a-symlink-at-hostinger\/"},"modified":"2026-11-06T06:04:07","modified_gmt":"2026-11-06T06:04:07","slug":"1583694-how-to-create-a-symlink-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/1583694-how-to-create-a-symlink-at-hostinger\/","title":{"rendered":"How to create a symlink at Hostinger"},"content":{"rendered":"<p class=\"no-margin\">Create a symlink at Hostinger to add a shortcut to an existing file or folder on your hosting plan. A symlink (symbolic link) points to the original file, so you can reach files stored in different locations without copying them. You create symlinks with the <code>ln -s<\/code> command over SSH, then open them like any other file in File Manager.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">For an overview of other supported file transfer and server access options, see <a data-click-id=\"hgr-post-content-link-which-file-transfer-and-server-access-options-are-supported\" href=\"https:\/\/www.hostinger.com\/support\/which-file-transfer-and-server-access-options-are-supported-at-hostinger\/\">which file transfer and server access options are supported at Hostinger.<\/a><\/div><h3>Before you start<\/h3><ul>\n<li>Symlink functionality is disabled by default on Web and Cloud hosting plans. To enable it, follow how to <a data-click-id=\"hgr-post-content-link-enable-disabled-php-functions\" href=\"https:\/\/www.hostinger.com\/support\/3212034-how-to-enable-disabled-php-functions\/\">enable disabled PHP functions<\/a> first.<\/li>\n<li>Agency plans do not support symlinks.<\/li>\n<li>On VPS, symlink functionality is enabled by default, and you can follow the same steps.<\/li>\n<\/ul><h2 id=\"h-create-a-symlink-at-hostinger\">Create a symlink at Hostinger<\/h2><ol>\n<li class=\"no-margin\">Open a terminal for your hosting plan. You can use the <a data-click-id=\"hgr-post-content-link-terminal-in-hostinger-file-manager\" href=\"https:\/\/www.hostinger.com\/support\/how-to-use-the-terminal-in-hostinger-file-manager\/\">terminal in Hostinger File Manager<\/a>, or connect via <b><a data-click-id=\"hgr-post-content-link-ssh-connection\" class=\"intercom-content-link\" href=\"https:\/\/support.hostinger.com\/hpanel\/how-can-i-log-in-to-my-account-via-ssh\" target=\"_blank\" rel=\"noopener\">SSH connection<\/a><\/b> with PuTTY, PenguiNet, or any other SSH client.<\/li>\n<li class=\"no-margin\">Go to the folder where you want to create the symlink. The terminal in File Manager opens in your website&rsquo;s folder, so to create the symlink next to your website files, run:<br>\n<code>cd public_html<\/code><\/li>\n<li class=\"no-margin\">Run the following command:<br>\n<code>ln -s original_file.php symlink_file.php<\/code><br>\nReplace <b>original_file.php<\/b> with the path of the file you want to create the shortcut for, and <b>symlink_file.php<\/b> with the name of the symlink. A relative path is resolved from the folder where you create the symlink, so use the full path if the original file is in another folder.<br>\n<img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2019\/02\/5bfde751-6d8c-4f82-a6d1-2b796a1f35c2.jpg\/public\" alt=\"OpenSSH terminal showing ln -s command creating symlink_file.php next to public_html\" data-media-id=\"5084\"><\/li>\n<li class=\"no-margin\">Check the symlink with <code>ls -l symlink_file.php<\/code>. The output shows where the symlink points, for example <code>symlink_file.php -&gt; original_file.php<\/code>. If the original file doesn&rsquo;t exist at that path, the symlink is still created but doesn&rsquo;t open.<\/li>\n<li class=\"no-margin\">Open <b><a data-click-id=\"hgr-post-content-link-file-manager\" class=\"intercom-content-link\" href=\"\/support\/4548688-basic-actions-in-the-file-manager-in-hostinger\/\" target=\"_blank\" rel=\"noopener\">File Manager<\/a><\/b> and go to the folder where you created the symlink. Click the symlink to open the original file.<\/li>\n<\/ol><p><!-- Replace with a screenshot of the new File Manager showing the symlink open --><\/p><div class=\"intercom-container\"><img decoding=\"async\" class=\"alignnone size-full wp-image-24743\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-06_13-03.png\" alt=\"\" width=\"1565\" height=\"724\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-06_13-03.png 1565w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-06_13-03-300x139.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-06_13-03-1024x474.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-06_13-03-768x355.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-06_13-03-1536x711.png 1536w\" sizes=\"(max-width: 1565px) 100vw, 1565px\" \/><\/div><p class=\"no-margin\">Your symlink is now ready to use as a shortcut to the original file.<\/p><p class=\"no-margin\"><b>NOTE<\/b><\/p><ul>\n<li>\n<p class=\"no-margin\">You can find all you need to know about symlinks in this tutorial: <b><a data-click-id=\"hgr-post-content-link-how-to-create-linux-symlinks\" class=\"intercom-content-link\" href=\"\/tutorials\/how-to-create-symbolic-links-in-linux\/\" target=\"_blank\" rel=\"noopener\">How to Create Linux Symlinks<\/a><\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">If File Manager shows <b>This file was moved or deleted<\/b> when you open a symlink, the original file isn&rsquo;t at the path the symlink points to. Remove the symlink with <code>rm symlink_file.php<\/code> and create it again with the correct path.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Creating symbolic links via SSH<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_content_updated_date":"","include_on_kodee":true,"footnotes":""},"categories":[218],"tags":[],"class_list":["post-1380","post","type-post","status-publish","format-standard","hentry","category-supported-technologies-and-functions"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/1583694-how-to-create-a-symlink-at-hostinger","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/1583694-esta-activada-la-funcion-symlink-en-hostinger","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/1583694-la-fonction-symlink-est-elle-activee-chez-hostinger","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/1583694-cara-membuat-dan-mengaktifkan-fungsi-symlink-di-hostinger","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/support\/1583694-a-funcao-symlink-esta-ativada-no-hostinger","default":0},{"locale":"uk-UA","link":"https:\/\/www.hostinger.com\/ua\/support\/1583694-\u044f\u043a-\u0443\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438-\u0444\u0443\u043d\u043a\u0446\u0456\u044e-\u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0447\u043d\u0438\u0445-\u043f\u043e","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=1380"}],"version-history":[{"count":7,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1380\/revisions"}],"predecessor-version":[{"id":24744,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1380\/revisions\/24744"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=1380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=1380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=1380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}