{"id":4286,"date":"2026-04-14T16:55:41","date_gmt":"2026-04-14T14:55:41","guid":{"rendered":"https:\/\/www.combell.nl\/en\/help\/?post_type=ht_kb&#038;p=4286"},"modified":"2026-04-15T11:11:19","modified_gmt":"2026-04-15T09:11:19","slug":"deploying-laravel-on-shared-hosting","status":"publish","type":"ht_kb","link":"https:\/\/www.combell.nl\/en\/help\/kb\/deploying-laravel-on-shared-hosting\/","title":{"rendered":"Deploying Laravel on shared hosting"},"content":{"rendered":"\n<p>Laravel is a powerful PHP framework, but it requires a specific folder structure that does not fully match the standard setup of our shared hosting. In this article, we explain how to correctly deploy Laravel on a Combell hosting package.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Not possible by default<\/h2>\n\n\n\n<p>On a Combell hosting package, your website is loaded by default from the <strong>www<\/strong> folder.<\/p>\n\n\n\n<p>Laravel, however, expects the publicly accessible files to be located in the <strong>public<\/strong> folder.<\/p>\n\n\n\n<p>This creates a conflict:<\/p>\n\n\n\n<ul>\n<li>Hosting expects: <strong><code>www<\/code><\/strong><\/li>\n\n\n\n<li>Laravel expects: <strong><code>public<\/code><\/strong><\/li>\n<\/ul>\n\n\n\n<p>If you do nothing, your website will not work correctly or may not be visible at all.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution: symlink from www to public<\/h2>\n\n\n\n<p>The recommended solution is to create a symbolic link (symlink) from the <strong>www<\/strong> folder to the <strong>public<\/strong> folder.<\/p>\n\n\n\n<p>This way:<\/p>\n\n\n\n<ul>\n<li>The hosting still sees a <strong><code>www<\/code><\/strong> folder<\/li>\n\n\n\n<li>But the files are actually served from Laravel\u2019s <strong><code>public<\/code><\/strong> folder<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Upload your Laravel project<\/h3>\n\n\n\n<p>Upload your full Laravel project to your hosting package, for example via FTP or Git.<\/p>\n\n\n\n<p>Make sure the structure looks roughly like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/home\/username\/<br>    \u251c\u2500\u2500 app<br>    \u251c\u2500\u2500 bootstrap<br>    \u251c\u2500\u2500 config<br>    \u251c\u2500\u2500 public<br>    \u251c\u2500\u2500 resources<br>    \u251c\u2500\u2500 routes<br>    \u2514\u2500\u2500 ...<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Rename the existing www folder<\/h3>\n\n\n\n<p>Rename the <strong>www<\/strong> folder to something like <strong>www_old<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Create a symlink via SSH<\/h3>\n\n\n\n<p>Connect to your hosting via SSH and run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ln -s public www<\/pre>\n\n\n\n<p><strong>What does this do?<\/strong><\/p>\n\n\n\n<ul>\n<li><strong>www<\/strong> becomes a reference to <strong>public<\/strong><\/li>\n\n\n\n<li>The web server thinks it is serving from <strong>www<\/strong><\/li>\n\n\n\n<li>But in reality, it uses Laravel\u2019s <strong>public<\/strong> folder<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Alternative solution<\/h2>\n\n\n\n<p>Instead of using a symlink, you can also modify Laravel so that the framework uses the <strong>www<\/strong> folder instead of <strong>public<\/strong>.<\/p>\n\n\n\n<p>This requires changes in the Laravel configuration and is less recommended.<\/p>\n\n\n\n<p>More information can be found here:<br><a href=\"https:\/\/developerhowto.com\/2018\/11\/12\/how-to-change-the-laravel-public-folder\/\" target=\"_blank\" rel=\"noopener\">https:\/\/developerhowto.com\/2018\/11\/12\/how-to-change-the-laravel-public-folder\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Laravel is a powerful PHP framework, but it requires a specific folder structure that does not fully match the standard setup of our shared hosting. In this article, we explain how to correctly deploy Laravel on a Combell hosting package. Not possible by default On a Combell hosting package, your&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[52,16],"ht-kb-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/4286"}],"collection":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/comments?post=4286"}],"version-history":[{"count":2,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/4286\/revisions"}],"predecessor-version":[{"id":4288,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/4286\/revisions\/4288"}],"wp:attachment":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/media?parent=4286"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb-category?post=4286"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb-tag?post=4286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}