{"id":303,"date":"2022-11-17T10:53:39","date_gmt":"2022-11-17T04:53:39","guid":{"rendered":"http:\/\/itllive.com\/knowledgebase\/?p=303"},"modified":"2022-11-17T10:53:39","modified_gmt":"2022-11-17T04:53:39","slug":"how-to-deploy-laravel-project-on-shared-hosting-using-cpanel","status":"publish","type":"post","link":"https:\/\/itllive.com\/knowledgebase\/2022\/11\/17\/how-to-deploy-laravel-project-on-shared-hosting-using-cpanel\/","title":{"rendered":"How to deploy Laravel project on Shared Hosting using cPanel"},"content":{"rendered":"<p>Step 1: Zip archive all contents inside your project directory.<\/p>\n<p>Step 2: Upload the Zip file into hosting directory. Extract the same inside the hosting directory.<\/p>\n<p>Step 3: Move all files from &#8220;public&#8221; folder to the hosting directory.<\/p>\n<p>Step 4: Edit &#8220;index.php&#8221; in the root directory and change the path like following.<br \/>\n<code><br \/>\n\/\/require __DIR__.'\/..\/vendor\/autoload.php';<br \/>\nrequire __DIR__.'\/vendor\/autoload.php';<\/code><\/p>\n<p><code><br \/>\n\/\/$app = require_once __DIR__.'\/..\/bootstrap\/app.php';<br \/>\n$app = require_once __DIR__.'\/bootstrap\/app.php';<br \/>\n<\/code><\/p>\n<p>Step 5: Edit &#8220;server.php&#8221; in the root directory and change the path like following.<br \/>\n<code><br \/>\n\/\/ require_once __DIR__.'\/public\/index.php';<br \/>\nrequire_once __DIR__.'\/index.php';<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1: Zip archive all contents inside your project directory. Step 2: Upload the Zip file into hosting ...<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[35],"class_list":["post-303","post","type-post","status-publish","format-standard","hentry","category-laravel","tag-hosting-laravel"],"_links":{"self":[{"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":1,"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/303\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/303\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itllive.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}