<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Robert Wayne</title>
    <description>The latest articles on DEV Community by Robert Wayne (@webrobert).</description>
    <link>https://dev.to/webrobert</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F760811%2F984d9bd2-ea3c-47d9-994b-f1cab7f2fab2.png</url>
      <title>DEV Community: Robert Wayne</title>
      <link>https://dev.to/webrobert</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/webrobert"/>
    <language>en</language>
    <item>
      <title>SOP for Creating, Deploying &amp; Managing (Laravel) Websites on Bluehost Shared</title>
      <dc:creator>Robert Wayne</dc:creator>
      <pubDate>Thu, 25 Nov 2021 15:19:35 +0000</pubDate>
      <link>https://dev.to/webrobert/sop-for-creating-deploying-managing-websites-on-bluehost-shared-46m5</link>
      <guid>https://dev.to/webrobert/sop-for-creating-deploying-managing-websites-on-bluehost-shared-46m5</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;📎 I created this for my own standard operating procedure. Mainly, so I don't forget how to create and launch new sites! It was suggested that I share it with the community. That said, I'm not an expert. Your results may vary. And please I am always open to feedback for improving the process.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  My Method/Workflow
&lt;/h2&gt;

&lt;p&gt;I have a git repository folder on my production server, Bluehost. My account is a shared account, &lt;em&gt;Pro Web Hosting&lt;/em&gt;. I create a repository there and also a live public folder for new sites.&lt;/p&gt;

&lt;p&gt;Typical workflow...  &lt;strong&gt;start making a site locally → push updates to the repository → shh into the live folder and pull the site in from the repository.&lt;/strong&gt; I was originally inspired by this &lt;a href="https://www.sitepoint.com/deploy-website-using-laravel-git/"&gt;guide&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Creating
&lt;/h2&gt;

&lt;p&gt;You must have ssh access enabled on your Bluehost account. Use  your Bluehost ip address and username... &lt;code&gt;your_usernam@50.88.888.88&lt;/code&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  My Git Workflow
&lt;/h3&gt;

&lt;p&gt;Use this method if you already started building the site locally.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. You already started developing your Laravel App.
&lt;/h4&gt;

&lt;p&gt;You have committed a git project locally.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Initialize a &lt;code&gt;-bare&lt;/code&gt; repository
&lt;/h4&gt;

&lt;p&gt;SSH into Bluehost "production server" and locate the directory you would like your central repository. I have a folder called &lt;code&gt;Repo&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh your_usernam@50.88.888.88
&lt;span class="nb"&gt;cd &lt;/span&gt;repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Initialize a new repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init &lt;span class="nt"&gt;--bare&lt;/span&gt; &lt;span class="nt"&gt;--shared&lt;/span&gt; sitename.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note this is outside of your public folder structure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  3. Add remote to your local project
&lt;/h4&gt;

&lt;p&gt;Go to local website folder (on your computer).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/&lt;span class="s2"&gt;"Path/to/websites/sitename"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the repo as origin&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin your_usernam@50.88.888.88:~/repo/sitename.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Force push the site and set origin as upstream&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nt"&gt;--set-upstream&lt;/span&gt; origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;There's probably a better way but this seems to work great for this use case.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Alternate Git workflow when starting from the repo
&lt;/h3&gt;

&lt;p&gt;Use this method if you don't already have a dev site locally.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Initialize your &lt;code&gt;-bare&lt;/code&gt; repository
&lt;/h4&gt;

&lt;p&gt;SSH into Bluehost "production server" and locate the directory you would like your central repository. I have a folder called &lt;code&gt;Repo&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh your_usernam@50.88.888.88
&lt;span class="nb"&gt;cd &lt;/span&gt;repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now initialize your repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init &lt;span class="nt"&gt;--bare&lt;/span&gt; &lt;span class="nt"&gt;--shared&lt;/span&gt; sitename.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note this is outside of your public folder structure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  2. Clone to create local website
&lt;/h4&gt;

&lt;p&gt;Go to local website files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/&lt;span class="s2"&gt;"Path/to/websites"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now clone the central &lt;code&gt;--bare&lt;/code&gt; repository you just created and logout of this SSH session.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone your_usernam@50.88.888.88:~/repo/sitename.git sitename
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3 .Start developing your Laravel App.
&lt;/h4&gt;

&lt;p&gt;Celebrate and start making something.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Clone from repo to create live website
&lt;/h3&gt;

&lt;p&gt;(if you are not already logged into bluehost via ssh)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh your_usernam@50.88.888.88
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go to live website files&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/public_html/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now clone the central repository for the site&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone your_usernam@50.88.888.88:~/repo/sitename.git sitename
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Bluehost admin tasks
&lt;/h3&gt;

&lt;p&gt;From the Bluehost admin website we will create a database for the project, assign a domain, and add emails. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;As an aside, I did read its possible to ssh a database into Bluehost but haven't taken the time to see if/how it can be automated when making a Laravel project.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  a. &lt;strong&gt;Assign a domain OR create subdomain&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ASSIGN A DOMAIN&lt;br&gt;
From the &lt;strong&gt;Domains&lt;/strong&gt; sub menu choose &lt;strong&gt;Assign.&lt;/strong&gt; Follow directions to assign your domain to Bluehost. When you get to &lt;em&gt;Step 4: Choose Addon Directory and Sub-domain&lt;/em&gt; select &lt;em&gt;Use an existing directory&lt;/em&gt; and choose the &lt;code&gt;/sitename/public/&lt;/code&gt; from the populated dropdown.&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CREATE A SUBDOMAIN&lt;br&gt;
From the &lt;strong&gt;&lt;em&gt;Domains&lt;/em&gt;&lt;/strong&gt; sub menu choose &lt;strong&gt;subdomains.&lt;/strong&gt; Make the &lt;em&gt;Home folder&lt;/em&gt; is &lt;code&gt;/sitename/public/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  b. &lt;strong&gt;Create any site related Email Addresses from the cPanel&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The cPanel has been moved to the "Advanced" menu tab.&lt;/p&gt;

&lt;p&gt;If you plan to send site notifications using Bluehost smtp you must setup an email for it using the site domain or use an email already related to your account. &lt;/p&gt;

&lt;h4&gt;
  
  
  c. &lt;strong&gt;Create Database via cPanel&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;cpanel -&amp;gt; MySQL Databases → Create New Database&lt;/li&gt;
&lt;li&gt;After created go back to the Databases page and add yourself as a user to the new database with all privileges.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. Edit the site .env file
&lt;/h3&gt;

&lt;p&gt;Using ssh go to live website files&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/public_html/sitename/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rename the example env file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv&lt;/span&gt; .env.example .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Edit the .env file adding relevant production values&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vim .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Quick Reminder Crib Sheet for VIM: &lt;code&gt;i&lt;/code&gt; to edit (insert), &lt;code&gt;esc&lt;/code&gt; to stop editing, &lt;code&gt;:wq&lt;/code&gt; to write and quit, OR &lt;code&gt;:q&lt;/code&gt; to quit without saving&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Add the new database credentials and app into to .env&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;APP_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Sitename
&lt;span class="nv"&gt;APP_ENV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;production
&lt;span class="nv"&gt;APP_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;
&lt;span class="nv"&gt;APP_DEBUG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true
&lt;/span&gt;&lt;span class="nv"&gt;APP_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://sitename.com

...

&lt;span class="nv"&gt;DB_CONNECTION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;mysql
&lt;span class="nv"&gt;DB_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;localhost
&lt;span class="nv"&gt;DB_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3306
&lt;span class="nv"&gt;DB_DATABASE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_username_sitename
&lt;span class="nv"&gt;DB_USERNAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_username
&lt;span class="nv"&gt;DB_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_blue_password

...

&lt;span class="nv"&gt;MAIL_MAILER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;smtp
&lt;span class="nv"&gt;MAIL_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;mail.sitename.com
&lt;span class="nv"&gt;MAIL_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;465
&lt;span class="nv"&gt;MAIL_USERNAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;notifications@sitename.com
&lt;span class="nv"&gt;MAIL_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;thEemailPaSsowrd
&lt;span class="nv"&gt;MAIL_ENCRYPTION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ssl
&lt;span class="nv"&gt;MAIL_FROM_ADDRESS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;notifications@sitename.com
&lt;span class="nv"&gt;MAIL_FROM_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;APP_NAME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;💡 Remember: Bluehost databases are automatically prefixed with &lt;code&gt;your_username_&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;⛔ Come back and set to &lt;code&gt;app_debug to false&lt;/code&gt; once you confirm the site works.&lt;/p&gt;

&lt;p&gt;📨 For emails to work via Bluehost smtp it may require a chat with support for them to edit your site permissions for emails using their tool &lt;em&gt;putty&lt;/em&gt;. &lt;code&gt;If you get a swift error when the site is trying to sending emails.&lt;/code&gt; Chat up support!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4. Composer Install and such...
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Here we use a modified version of Laravel's, composer install.&lt;/strong&gt; (check with Bluehost for your correct version/path) This may just be my forcing php 8, idk.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/usr/local/bin/ea-php80 /opt/cpanel/composer/bin/composer &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--optimize-autoloader&lt;/span&gt; &lt;span class="nt"&gt;--no-dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OR if you have dev dependency you haven't sorted out yet&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/usr/local/bin/ea-php80 /opt/cpanel/composer/bin/composer &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generate the site key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan key:generate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Migrate the database, here I'm also seeding it with defaults&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan migrate:fresh &lt;span class="nt"&gt;--seed&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;A warning will be shown... Are you sure! You're in production.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;Edit the .htaccess&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here we include the php8 version handler and force the site to use https. You may potential be able to skip this step.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;public
vim .htaccess
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From this...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;
    &amp;lt;IfModule mod_negotiation.c&amp;gt;
        Options &lt;span class="nt"&gt;-MultiViews&lt;/span&gt; &lt;span class="nt"&gt;-Indexes&lt;/span&gt;
    &amp;lt;/IfModule&amp;gt;

    RewriteEngine On

    &lt;span class="c"&gt;# Handle Authorization Header&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;HTTP:Authorization&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
    RewriteRule .&lt;span class="k"&gt;*&lt;/span&gt; - &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;E&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;HTTP_AUTHORIZATION:%&lt;span class="o"&gt;{&lt;/span&gt;HTTP:Authorization&lt;span class="o"&gt;}]&lt;/span&gt;

    &lt;span class="c"&gt;# Redirect Trailing Slashes If Not A Folder...&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;REQUEST_FILENAME&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;REQUEST_URI&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;.+&lt;span class="o"&gt;)&lt;/span&gt;/&lt;span class="err"&gt;$&lt;/span&gt;
    RewriteRule ^ %1 &lt;span class="o"&gt;[&lt;/span&gt;L,R&lt;span class="o"&gt;=&lt;/span&gt;301]

    &lt;span class="c"&gt;# Send Requests To Front Controller...&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;REQUEST_FILENAME&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;REQUEST_FILENAME&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;-f&lt;/span&gt;
    RewriteRule ^ index.php &lt;span class="o"&gt;[&lt;/span&gt;L]
&amp;lt;/IfModule&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To this...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;
    &amp;lt;IfModule mod_negotiation.c&amp;gt;
        Options &lt;span class="nt"&gt;-MultiViews&lt;/span&gt; &lt;span class="nt"&gt;-Indexes&lt;/span&gt;
    &amp;lt;/IfModule&amp;gt;

    RewriteEngine On

    &lt;span class="c"&gt;# FORCE HTTPS&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;HTTPS&lt;span class="o"&gt;}&lt;/span&gt; off
    RewriteRule ^&lt;span class="o"&gt;(&lt;/span&gt;.&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;https://%&lt;span class="o"&gt;{&lt;/span&gt;HTTP_HOST&lt;span class="o"&gt;}&lt;/span&gt;%&lt;span class="o"&gt;{&lt;/span&gt;REQUEST_URI&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;L,R&lt;span class="o"&gt;=&lt;/span&gt;301]

    &lt;span class="c"&gt;# Handle Authorization Header&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;HTTP:Authorization&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
    RewriteRule .&lt;span class="k"&gt;*&lt;/span&gt; - &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;E&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;HTTP_AUTHORIZATION:%&lt;span class="o"&gt;{&lt;/span&gt;HTTP:Authorization&lt;span class="o"&gt;}]&lt;/span&gt;

    &lt;span class="c"&gt;# Redirect Trailing Slashes If Not A Folder...&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;REQUEST_FILENAME&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;REQUEST_URI&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;.+&lt;span class="o"&gt;)&lt;/span&gt;/&lt;span class="err"&gt;$&lt;/span&gt;
    RewriteRule ^ %1 &lt;span class="o"&gt;[&lt;/span&gt;L,R&lt;span class="o"&gt;=&lt;/span&gt;301]

    &lt;span class="c"&gt;# Send Requests To Front Controller...&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;REQUEST_FILENAME&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;
    RewriteCond %&lt;span class="o"&gt;{&lt;/span&gt;REQUEST_FILENAME&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;-f&lt;/span&gt;
    RewriteRule ^ index.php &lt;span class="o"&gt;[&lt;/span&gt;L]
&amp;lt;/IfModule&amp;gt;

&lt;span class="c"&gt;# This handler adds the correct php [version?]&lt;/span&gt;
&amp;lt;IfModule mime_module&amp;gt;
    AddHandler application/x-httpd-ea-php80 .php .php8 .phtml
&amp;lt;/IfModule&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;POW, The site is working! Visit the url for you new site.&lt;/p&gt;

&lt;p&gt;Here you can run any other cache suggestions from Laravel's &lt;a href="https://laravel.com/docs/8.x/deployment#optimization"&gt;deployment section&lt;/a&gt;. I wait, until I know the site works properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing/Updating
&lt;/h2&gt;

&lt;p&gt;[ This section is a work in progress]&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Push New Code to the Repository
&lt;/h3&gt;

&lt;p&gt;From your local project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Pull it into the Live website
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh your_usernam@50.88.888.88
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go to live website files&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/public_html/sitename
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pull updated site in from repository&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's all for now. I hope this helps. Please let me know your thoughts and/or suggestions.&lt;/p&gt;

</description>
      <category>laravel</category>
    </item>
  </channel>
</rss>
