{"id":224,"date":"2018-12-06T17:10:28","date_gmt":"2018-12-06T11:40:28","guid":{"rendered":"https:\/\/mediastroke.com\/blog\/?p=224"},"modified":"2022-06-06T12:02:52","modified_gmt":"2022-06-06T06:32:52","slug":"host-laravel-project","status":"publish","type":"post","link":"https:\/\/mediastroke.com\/blog\/host-laravel-project\/","title":{"rendered":"Host laravel project on cPanel"},"content":{"rendered":"
First of all, we have to get all the files & directories into laravel_project <\/strong>folder. open your terminal & go inside your project folder,\u00a0 And run the command\u00a0php artisan cache:clear<\/strong><\/span>. to clear your cache.<\/p>\n then run\u00a0php artisan config:clear<\/span><\/strong> to clear the\u00a0cached version of your config file, if there is any.<\/p>\n Now make a zip folder of your project\u2019s folder for ex. Laravel_project<\/p>\n <\/a><\/p>\n After login to your cPanel, for uploading folder go to File Manager, <\/strong>& upload your folder in root directory,\u00a0i have created laravel_project<\/strong> folder in root directory.<\/p>\n <\/a><\/p>\n \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Unzip (your project\u2019s folder)<\/span>laravel_project<\/strong>\u00a0open <\/span>laravel_project<\/strong> folder and\u00a0move all the public folder content into <\/span>public_html<\/strong> directory.\u00a0so make sure that, you do not have to keep anything in public<\/strong> folder, it should be blank.<\/span><\/p>\n <\/a><\/p>\n keep .htaccess file into public_html<\/strong> & into (your created folder)laravel_project<\/strong> that is outside the public_html. Or copy .htaccess file from public folder & paste it into laravel_project.<\/p>\n <\/a><\/p>\n And Edit index.php file like following way add laravel_project<\/strong> name before \/vendor.<\/p>\n <\/a><\/p>\n If you have dynamic work done into your project then create database connectivity through your .env<\/strong> file that will be available into laravel_project<\/strong> folder if it is not shown then click on settings<\/strong> on right corner of cPanel\u00a0on the Preferences window,<\/strong>\u00a0enable the checkbox show hidden files(dotfiles)<\/strong>.<\/p>\n If you do not know how to make database connectivity then please refer this link\u00a0<\/span>\u00a0<\/span><\/span>\u00a0 \u00a0<\/span>https:\/\/mediastroke.com\/blog\/deploy-dynamic-java-project-on-java-hosting\/<\/a><\/p>\n At the end run your domain on the browser. Like<\/p>\nStep 2 : – Upload your folder<\/strong><\/h5>\n
Step 3:-\u00a0<\/span><\/strong><\/h5>\n
Step 4<\/strong> :-<\/h5>\n
Step 5<\/strong>:-<\/h5>\n
Step 6:-<\/strong><\/h5>\n
Step 7<\/strong>:-<\/h5>\n