<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[HostCabal - Medium]]></title>
        <description><![CDATA[Premium Hosting and Cloud Services Provider - Medium]]></description>
        <link>https://medium.com/hostcabal?source=rss----4aa785e6aeaa---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>HostCabal - Medium</title>
            <link>https://medium.com/hostcabal?source=rss----4aa785e6aeaa---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 03:14:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/hostcabal" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[THE REALITY OF CYBERCRIMES]]></title>
            <link>https://medium.com/hostcabal/the-reality-of-cybercrimes-6d35c85c50df?source=rss----4aa785e6aeaa---4</link>
            <guid isPermaLink="false">https://medium.com/p/6d35c85c50df</guid>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[cybercrime]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[John Akindulureni]]></dc:creator>
            <pubDate>Thu, 20 Sep 2018 09:27:07 GMT</pubDate>
            <atom:updated>2018-09-20T09:27:07.173Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Wva52D_HUOOWtIMcd27PIw.jpeg" /></figure><p>Without a doubt, it is known that criminals, in their different forms and varieties, have a particular target; <strong><em>things of value</em></strong>!</p><p>Consider the fact that technology has made computers become an integral part of businesses, governments, organizations, and individuals, and the reality that these systems contain valuable information and you naturally see a workspace for criminals.</p><p>As more people continue to flood their smartphones, computers and other devices with valuable data, potential targets are made for cybercriminals.</p><p>Given, these criminals no longer have to physically break into your house or worry about the drilling into the safe in your bedroom, leaving you physical evidence of their activities. Now, they can attack remotely, thanks to the internet, without leaving a trace, and possibly without retribution too.</p><p>Cybercrimes evolved from <strong>Phreaking</strong> (phone attacks), <strong>Morris worm</strong> (first computer worm), <strong>Ransomeware</strong> (malicious software) in the 70’s and 80’s which needed physical interaction, to <strong>email and web browser cybercrimes</strong> in the 90’s.</p><p>Thanks to the advent of social media in the 2000’s, cybercrimes took on a new look in the rise of <strong>identity and information theft</strong>, <strong>cyber-extortion</strong>, <strong>financial fraud</strong> etc. Now, the fast-paced tech landscape has given rise to the exponential growth of cybercrime activities, e.g. through botnets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*eGiOA5tE8Jv_lce16ytFXg.jpeg" /></figure><p>These realities have made the cybercrime industry and organizations work on data protection and security by asking the following questions;</p><blockquote>Where is private data located and who is accessing the data?</blockquote><blockquote>Which users have access to the data and should they have such access?</blockquote><blockquote>How is the data accessed?</blockquote><blockquote>Who is responsible for data monitoring?</blockquote><blockquote>What is the acceptable level of risk and who is responsible for data loss/breach?</blockquote><blockquote>Can lost data be determined in the case of a breach?</blockquote><blockquote>Are the processes for answering these questions repeatable, timely, scalable and cost-effective?</blockquote><p>The ultimate question is:</p><h3>What are you doing to protect yourself?</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d35c85c50df" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hostcabal/the-reality-of-cybercrimes-6d35c85c50df">THE REALITY OF CYBERCRIMES</a> was originally published in <a href="https://medium.com/hostcabal">HostCabal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run linux commands as root from a PHP app]]></title>
            <link>https://medium.com/hostcabal/how-to-run-linux-commands-as-root-from-a-php-app-6b5e3348cb2b?source=rss----4aa785e6aeaa---4</link>
            <guid isPermaLink="false">https://medium.com/p/6b5e3348cb2b</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[php-development]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Adetunji 'TeeJay' Opayele]]></dc:creator>
            <pubDate>Sun, 05 Aug 2018 04:40:13 GMT</pubDate>
            <atom:updated>2018-08-05T07:53:44.174Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DKzZGfTjF0V_yvQV" /><figcaption>“A little penguin standing on a path in Península Valdés” by <a href="https://unsplash.com/@parradesign?utm_source=medium&amp;utm_medium=referral">Giorgio Parravicini</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I often find myself in situations where i need to run system commands right from my php project. Some activities like restarting a linux service for example require you to be root (superuser) to run.</p><p>However you cannot ‘sudo’ from your php application and it is not advisable to give your web server user root privilege, so we have to get a lil creative here.</p><p>disclaimer: make sure you really know what you are doing before you run a command as root ooo…</p><p>Okay! Let’s jump right into it.</p><p>The general idea is to write a tiny C program to run your command as root. As an example we’ll create a wrapper to restart the mysqld service from php as root.</p><ol><li>Create a c program to run the system command as root no matter what user executes it.</li></ol><pre># nano restart_mysql.c<br>    #include &lt;stdlib.h&gt;<br>    #include &lt;sys/types.h&gt;<br>    #include &lt;unistd.h&gt;<br>    <br>    int main (int argc, char *argv[])<br>    {<br>        setuid (0);<br><br>     system (&quot;/sbin/service mysqld restart&quot;);<br><br>     return 0;<br>   } </pre><p>2. Compile the c program and set the binary ownership to root with root permission.</p><pre># gcc restart_mysql.c -o restart_mysql<br># chown root restart_mysql<br># chmod u=rwx,go=xr,+s restart_mysql</pre><p>Voila! now restart_mysql binary will always run as root and execute the commands coded into it. Last thing we have to do is to execute the restart_mysql binary from our php code like so</p><pre>functions restartMysql()<br>{<br>     exec(&#39;/path/to/restart_mysql&#39;);<br>}</pre><p>All done!</p><p>You can create multiple c binaries to run different root command and exec() them in your php as required.</p><p>If you find that you have to update the command to executed often or you need to execute a series of commands, you can create a shell script that contains the commands to be executed as root.</p><pre># nano my_shell.sh<br>     #!/bin/sh<br>     /sbin/service ftpd restart      <br>     echo &#39;restart done&#39; &gt; log.txt   </pre><p>then set the file ownership to root and make it only writable by root</p><pre># chown root my_shell.sh<br># chmod u=rwx,go=xr my_shell.sh</pre><p>Now update your c program to run the shell script as root.</p><pre># nano root_shell.c<br>    #include &lt;stdlib.h&gt;<br>    #include &lt;sys/types.h&gt;<br>    #include &lt;unistd.h&gt;<br>    <br>    int main (int argc, char *argv[])<br>    {<br>        setuid (0);<br><br>         /* Only use an absolute path to the script,<br>          * a malicious user might take advantage of this<br>          * */<br><br>     system (&quot;/bin/sh /path/to/my_shell.sh&quot;);<br><br>     return 0;<br>   }</pre><p>Compile the c program and set the binary ownership to root with root permission.</p><pre># gcc root_shell.c -o root_shell<br># chown root root_shell<br># chmod u=rwx,go=xr,+s root_shell</pre><p>All done! root_shell will run as root and execute the commands found in the my_shell.sh, Now you can change the commands in the shell script without having to recompile the binary.</p><p>Hope you find this useful.</p><p>Please share your thoughts or challenges in the comment. I’d love to help in any way i can.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b5e3348cb2b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hostcabal/how-to-run-linux-commands-as-root-from-a-php-app-6b5e3348cb2b">How to run linux commands as root from a PHP app</a> was originally published in <a href="https://medium.com/hostcabal">HostCabal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Impact of Tech on Events]]></title>
            <link>https://medium.com/hostcabal/the-impact-of-tech-on-events-64987b542c3?source=rss----4aa785e6aeaa---4</link>
            <guid isPermaLink="false">https://medium.com/p/64987b542c3</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[events]]></category>
            <dc:creator><![CDATA[John Akindulureni]]></dc:creator>
            <pubDate>Thu, 07 Jun 2018 19:54:36 GMT</pubDate>
            <atom:updated>2018-06-07T19:54:35.744Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NMp9Z6dVSbWhQTrB" /><figcaption>Photo by <a href="https://unsplash.com/@elenadesotophoto?utm_source=medium&amp;utm_medium=referral">Elena de Soto</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A look back at how events were organized a decade or two ago will make you realize how far we’ve come and the huge impact of technology. Advances in tech have brought far-reaching improvements in different areas;</p><h3>#1 Facial recognition</h3><p>Artificial intelligence (AI)is already being used for face recognition on smartphones and devices. Face recognition algorithms make event registration and authentication processes more efficient and easier than they used to be. The AI algorithms are designed to analyze facial features and expressions, body shapes, and body language.</p><h3>#2 Social media</h3><p>Campaigns and awareness about events are best made on social media to attract attendees. The cool thing is that interested people can register their interest in attending the event directly on the social media platform, helping planners gather data about prospective attendees.</p><h3>#3 Radio-Frequency Identification (RFID)</h3><p>RFID is the tech used to read and capture information stored on tags attached to ID cards, even from a few feet away. It doesn’t even require direct line-of-sight to work. With RFID, registration time for events by attendees is reduced, and tickets are easily replaceable.</p><h3>#4 Chatbots</h3><p>Chatbots are AI-powered techs that offer great user and personalized experiences to attendees of events. They deliver unique customer service by providing prompt and efficient answers to questions. What’s more, the chatbot services are available pre-, syn-, and post-event thereby facilitating user engagement and future attendance.</p><h3>#5 Customized apps</h3><p>Developing and customizing apps for events is now easy. The apps deliver schedules, provide speaker information, and allow attendees to bookmark locations. Besides, apps aid networking with peers and professionals to facilitate growth and expansion.</p><h3>#6 Live streaming</h3><p>You can’t attend? Relax! The event will be brought to you live on your preferred device(s) as it’s happening. That’s the power of live streaming. The audience expands well beyond the location and capacity of the event and followers are able to share the live stream (e.g., via tweets) with others.</p><p>We truly have come a long way!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64987b542c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hostcabal/the-impact-of-tech-on-events-64987b542c3">The Impact of Tech on Events</a> was originally published in <a href="https://medium.com/hostcabal">HostCabal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Alone Time]]></title>
            <link>https://medium.com/hostcabal/alone-time-3326ad034fd1?source=rss----4aa785e6aeaa---4</link>
            <guid isPermaLink="false">https://medium.com/p/3326ad034fd1</guid>
            <category><![CDATA[scheduling]]></category>
            <category><![CDATA[time]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[John Akindulureni]]></dc:creator>
            <pubDate>Tue, 24 Apr 2018 11:25:51 GMT</pubDate>
            <atom:updated>2018-04-24T11:25:50.810Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8w0gQdOY3LUwVf5D." /><figcaption>Photo by <a href="https://unsplash.com/@robinpierre?utm_source=medium&amp;utm_medium=referral">Robin Pierre</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>How long do you think you can go in a day without distractions? The notifications, unscheduled pings, phone calls etc. Not long I guess. We live in a fast-paced world that’s plagued with distractions of all sorts. There’s always some trending topic to entice you and gain your attention. You are subtly encouraged to join in and chided if you decide to withdraw from the drama. In fact, society usually equates anyone who seeks solitude or alone time as sad, lonely or anti-social, but is that really so?</p><p>Taking time away is extremely beneficial and healthy. Here’s how;</p><p>· Your brain gets a reboot and your mind is refreshed. You get the opportunity to clear your mind, think clearly, focus and connect your mind to your body</p><p>· Your ability to concentrate increases because the distractions are gone</p><p>· You find your own voice. Popular opinion and society’s expectations fade away and the real YOU shows up</p><p>· You are able to think deeply and work through problems much better</p><p>These won’t happen spontaneously, probably because the mind is already accustomed to the distractions, so it will be hard at first.</p><p>But you can take those bold steps now;</p><p>· Disconnect from it all, even if for a few minutes everyday</p><p>· Get up before others or get in early before them</p><p>· Shut your door</p><p>· Use your breaks</p><p>· Schedule your personal time</p><p>The productivity that results from giving yourself those moments to meditate and be alone by yourself is immense. <strong>Try It</strong>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TX0WVJt52T7KHo63." /><figcaption>“White double door in an empty room painted white” by <a href="https://unsplash.com/@philberndt?utm_source=medium&amp;utm_medium=referral">Philipp Berndt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3326ad034fd1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hostcabal/alone-time-3326ad034fd1">Alone Time</a> was originally published in <a href="https://medium.com/hostcabal">HostCabal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BECOMING YOUR OWN BOSS! ABCs]]></title>
            <link>https://medium.com/hostcabal/becoming-your-own-boss-abcs-43a2e5e76b9a?source=rss----4aa785e6aeaa---4</link>
            <guid isPermaLink="false">https://medium.com/p/43a2e5e76b9a</guid>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[business]]></category>
            <dc:creator><![CDATA[John Akindulureni]]></dc:creator>
            <pubDate>Sun, 15 Apr 2018 22:20:32 GMT</pubDate>
            <atom:updated>2018-04-15T22:20:31.649Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F5dkZX2viqjof3DQ." /><figcaption>“Close-up of a businessman&#39;s hands adjusting his tie” by <a href="https://unsplash.com/@ruthson_zimmerman?utm_source=medium&amp;utm_medium=referral">Ruthson Zimmerman</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Not everyone can be their own boss. Some will always need to answer to others, definitely. But, have you found yourself to be one of those people who love doing something so much that you want to make a career out it? Or are you just tired of the corporate world and want to run a business of your own? Good news; <strong>YOU CAN</strong>. So, whatever your motivation is for wanting to be your own boss, here are steps that can get you from here to there;</p><p>· Be a Master over Yourself</p><p>Everything begins with you. If you cannot manage yourself, then adding a business to the mix is dead on arrival. Develop a unique sense of self-awareness and personal discipline before anything else. Achieve self-mastery!</p><p>· Choose the Area of Application</p><p>Clearly identify the business area you want to delve into and what it’s about. Begin to build a network of those that are experts in the field and sow seeds that will eventually mature into connections. You never know when they will come in handy. If you are currently at a job that’s not related to what your business is about, be careful not to burn bridges.</p><p>· Learn</p><p>How grounded are you in the business you want to run? What would you say your level of knowledge is? Do you need to put in more time to know more about the nitty-gritties of how the core business works? Do you have hands-on experience? Also, the very fact that you are an excellent baker does not make you good at running a bakery. Learn business basics in order to thrive; read books, listen to related podcasts, consult professionals for advice to guide you in the startup phase.</p><p>· The Financial Outlook</p><p>According to CB Insights, <a href="https://www.cbinsights.com/research/startup-failure-reasons-top/">roughly 30% of companies fail</a> because they run out of cash. So, your finance plays a crucial role in starting your business. Do you plan to start the business on personal savings made, income from your current job or a loan? It is important for you to answer these questions and sort out the financial picture before setting up your business.</p><p>· WORK!</p><p>Depending on the nature of the business, you may start it part-time as a side hustle or you may dive in fully. The key is to work! Diane Mulcahy suggests that starting part-time gives you the opportunity to test your market, the demand for your products and services, and well as marketing and pricing strategies. You may not and will probably not get everything right at the start, but the more you work at it, the more you get the hang of things and a handle on things.</p><p><strong>Execute!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E60JMXw6hoYTFBlX." /><figcaption>“Laptop and lamp on desk with stacks of books and files” by <a href="https://unsplash.com/@fredmarriage?utm_source=medium&amp;utm_medium=referral">freddie marriage</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>You can also read about the <a href="https://www.hostcabal.com/blog/importance-seo-small-business/">importance of SEO to your business</a>, <a href="https://www.hostcabal.com/blog/use-social-media-target-customers-small-business/">how to use social media to target your customers</a>, and <a href="https://www.hostcabal.com/blog/5-elements-business-website-needs-successful/">what makes your business website stand out</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43a2e5e76b9a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hostcabal/becoming-your-own-boss-abcs-43a2e5e76b9a">BECOMING YOUR OWN BOSS! ABCs</a> was originally published in <a href="https://medium.com/hostcabal">HostCabal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LARAVEL APPLICATION DEPLOYMENT AND MANAGEMENT WORKFLOW ON A SHARED HOSTING]]></title>
            <link>https://medium.com/hostcabal/laravel-application-deployment-and-management-workflow-on-a-shared-hosting-a52db2866529?source=rss----4aa785e6aeaa---4</link>
            <guid isPermaLink="false">https://medium.com/p/a52db2866529</guid>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Adetunji 'TeeJay' Opayele]]></dc:creator>
            <pubDate>Sun, 11 Feb 2018 13:29:15 GMT</pubDate>
            <atom:updated>2023-06-14T15:23:24.253Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V_Dqg8rQWNuVHONA." /><figcaption>Photo by <a href="https://unsplash.com/@calypso999?utm_source=medium&amp;utm_medium=referral">Raul Varzar</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A friend asked for a guide to deploy a Laravel app on our Shared Hosting plan. Instead of sending him off to get lost in the endless abyss of Google, I decide to document my own personal way of deploying a Laravel app to a Shared Hosting Service.</p><p>I love Lavarel cause it’s really sweet and fun to develop with, yea your deployment workflow should be as fun too. Infact deploying Laravel on a shared hosting is pretty dang easy and laravel-like!</p><p>Lets dive into it!</p><p>This is a complete workflow of the initial deployment and continued maintenance of your Laravel application codebase in a shared hosting environment.</p><p>What you need.</p><ol><li>A Locally developed Laravel application running on your development environment (xampp, valet, homestead)</li><li>A Shared hosting account with SSH Access</li><li>A Shared hosting service that supports Git, Composer, PHP 7.x.x</li><li>Git installed on your local machine.</li></ol><p>In this guide we will setup our deployment workflow to automatically push updates from the local development machine to the server via git.</p><p>Getting Started!</p><h4>Prepping up on the hosting server</h4><p>Contact your web hosting provider for your ssh credential</p><p>on the mac/linux open terminal and run</p><pre>$ ssh -p 22 username@ipaddress</pre><p>replace <em>22</em> with your ssh port, <em>username</em> with the ssh username and ipaddress with the server ip address.</p><p>on windows, Download and install putty or any other ssh client and do the equivalent.</p><p>Create a directory called <em>repo/</em> for storing the app repository and another directory called <em>app/ </em>for storing the laravel app on the server.</p><pre>$ mkdir repo app</pre><p>Next navigate into the <em>repo/</em> directory and create a new git repo there.</p><pre>$ cd repo/<br>$ git init -— bare -— shared mywebsite.git</pre><h4>Prepping up your local app</h4><p>Navigate into your Laravel application directory in your development environment and initialise a new git repo (if you don’t already have one) .</p><pre>$ cd /username/projects/my-app/</pre><pre>$ git init</pre><pre>$ git add .</pre><pre>$ git commit -m &quot;Deploying my app to the shared hosting server&quot;</pre><pre>$ git remote add production ssh://username@ipaddress:port/~/repo/my-app.git</pre><p>What you just did was to enter the <strong><em>my-app</em></strong> directory on our local machine, initialise a new git repo with the <strong><em>git init</em></strong> command. Add all the files into the git repo with the <strong><em>git add .</em></strong> command, then commit all the changes into the repo with a -m message and finally add a remote repo with the <strong><em>git remote</em></strong> command (make sure to replace username, ipaddress and port with your shared hosting credentials)</p><p>Now ssh back into your shared hosting account and set up the post receive git hook. This is a series of commands to run at a git repo receives a git push.</p><p>Navigate to the git directory <em>repos/my-app.git</em></p><pre>$ cd repos/my-app.git</pre><p>There is a <strong><em>hooks</em></strong> directory in your my-app.git, that is where all the git hooks are stored.</p><p>Navigate into the hooks directory and create a post-receive file.</p><pre>$ cd hooks</pre><pre>$ cat &gt; post-receive</pre><pre>#!/bin/sh<br>git —-work-tree=/home/username/app/ --git-dir=/home/username/repo/my-app.git checkout -f</pre><pre>cd /home/username/app/</pre><pre>composer install</pre><pre># Optimizations</pre><pre>echo “Running optimizations”</pre><pre>php artisan config:cache</pre><pre>php artisan route:cache</pre><pre>echo “Done :)”</pre><p>Hit control-c on the mac or control-d on windows to get back the shell prompt and run <strong><em>chmod +x post-receive</em></strong> to make sure the post-receive file has execute permission.</p><pre>chmod +x post-receive</pre><p>Confirm the post receive file has all the command written into it with cat post-receive, if it spits out all the command you put in from above then all is set to go!</p><p>Back on the local machine. Time to push!</p><pre>$ git push production master</pre><p>Enter the ssh password on the prompt and watch the repo get pushed to the remote git repo on the hosting server. After the push, the app files will be checked out in to the <strong><em>app/</em></strong> directory as directed in the <strong><em>post-receive</em></strong> hook and you will see the familiar composer install running.</p><p>Last thing to do on the hosting server is to remove the public_html directory (fear not, the world will not end!)</p><pre>$ rm -r public_html/</pre><p>Then create a symlink between the Laravel <strong><em>public/</em></strong> directory to the hosting <strong><em>public_html/</em></strong> directory. (You only have to do this once)</p><pre>$ ln -s app/public public_html</pre><p>Yay!! We good to go! You did it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PRZ4z55gY6-trMzZ." /><figcaption>Photo by <a href="https://unsplash.com/@cosio?utm_source=medium&amp;utm_medium=referral">Konstantin Planinski</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Database set up.</h4><p>Navigate to your cpanel and create a new mysql database and database users.</p><p>Back in your ssh window <strong><em>cd</em></strong> into the <strong><em>app/</em></strong> directory.</p><pre>$ cd app/</pre><p>Create a .env file and fill in the database credentials.</p><pre>$ cp .env.example .env</pre><pre>$ nano .env</pre><p>Fill in the .env with your app and database info.</p><pre>APP_NAME=My-App</pre><pre>APP_ENV=production<br>APP_KEY=somerandomstring<br>APP_DEBUG=false<br>APP_LOG_LEVEL=debug<br>APP_URL=http://yourdomain.com/<br>DB_CONNECTION=mysql<br>DB_HOST=127.0.0.1<br>DB_PORT=3306<br>DB_DATABASE=my-app-db<br>DB_USERNAME=your-db-username<br>DB_PASSWORD=your-db-password</pre><p>You should generate a new app key with</p><pre>$ php artisan key:generate</pre><p>Congratulations! I knew you could do it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QSR_H_UOJ1n8apqj." /><figcaption>Photo by <a href="https://unsplash.com/@dear_jondog?utm_source=medium&amp;utm_medium=referral">Jonathan Daniels</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Time to test your app!</p><p>Come on now, don’t be shy. Navigate to your domain name in the browser.</p><p>If all went well, your Laravel app should load just fine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ilh0-3clXSra3Qjx1l0Lg.png" /></figure><p>So what happens when you make further changes to your applications source code?</p><p>All you have to do is to add it to the git repository and push it to production!</p><p>In you local app directory run.</p><pre><strong>$ git add .</strong> ##Adds all the updated file to the git repo</pre><pre><strong>$ git commit -m “Added an awesome new feature to app”</strong></pre><pre><strong>$ git push production master</strong> ##deploys new changes to the server</pre><p>You see, that way easier than copying hundreds of files via ftp! Cool right?</p><p>Note: If your hosting provider doesn’t have composer installed you can install it on your user with</p><pre>$ wget <a href="https://getcomposer.org/composer.phar">https://getcomposer.org/composer.phar</a></pre><p>or</p><pre>$ curl -sS <a href="https://getcomposer.org/installer">https://getcomposer.org/installer</a> | php — –filename=composer</pre><pre>$ chmod +x composer.phar</pre><p>If php composer doesn’t still work Run</p><pre>$ php -i | grep “php.ini”</pre><p>To find your php configuration file and then run composer with the appropriate config file.</p><pre>$ php -c php.ini composer</pre><p>Watch out for another guide to create a [beta] testing environment on your shared hosting before pushing codes to production.</p><p>Cheers…</p><p>Questions, Comments and Contributions are welcome! If your find this useful please share and give a like!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a52db2866529" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hostcabal/laravel-application-deployment-and-management-workflow-on-a-shared-hosting-a52db2866529">LARAVEL APPLICATION DEPLOYMENT AND MANAGEMENT WORKFLOW ON A SHARED HOSTING</a> was originally published in <a href="https://medium.com/hostcabal">HostCabal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>