<?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: martin2844</title>
    <description>The latest articles on DEV Community by martin2844 (@martin2844).</description>
    <link>https://dev.to/martin2844</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%2F155453%2F6c6ecea3-8f2e-456f-bf87-660ff0dcbe07.jpeg</url>
      <title>DEV Community: martin2844</title>
      <link>https://dev.to/martin2844</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/martin2844"/>
    <language>en</language>
    <item>
      <title>A video summary app using just nextjs + sqlite</title>
      <dc:creator>martin2844</dc:creator>
      <pubDate>Sun, 29 Sep 2024 19:49:31 +0000</pubDate>
      <link>https://dev.to/martin2844/a-video-summary-app-using-just-nextjs-sqlite-271m</link>
      <guid>https://dev.to/martin2844/a-video-summary-app-using-just-nextjs-sqlite-271m</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Building Vid4Pro: AI-Powered YouTube Video Analysis with Next.js&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I recently built &lt;a href="https://vid4.pro" rel="noopener noreferrer"&gt;Vid4Pro&lt;/a&gt;, a web application that uses AI to analyze and extract insights from YouTube videos. It was created with Next.js, SQLite, and deployed using Docker and Coolify. Here’s a deep dive into how I made it and the key features that make it stand out.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Key Features&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Video Analysis:&lt;/strong&gt; Paste any YouTube URL, and Vid4Pro extracts key insights, quotes, and summaries using AI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multilingual Support:&lt;/strong&gt; Handles multiple languages, including English and Spanish, thanks to localization files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Authentication:&lt;/strong&gt; Integrated with NextAuth for user sign-up, login, and managing different access levels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tiered Access Levels:&lt;/strong&gt; 

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Anonymous Users:&lt;/strong&gt; Basic access with limited extraction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logged-in Users:&lt;/strong&gt; Additional extractions and saved analyses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paid Users (Coming Soon):&lt;/strong&gt; Advanced features like batch analysis and API access.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Export Options:&lt;/strong&gt; Export findings as Markdown or PDF.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Support System:&lt;/strong&gt; Users can submit tickets for issues or feature requests.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Responsive UI:&lt;/strong&gt; Built with TailwindCSS, featuring a dock menu and smooth user experience.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Database Integration:&lt;/strong&gt; SQLite with Knex ensures efficient data management.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;API (Coming Soon):&lt;/strong&gt; A REST API for integrating YouTube analysis into other applications.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Tech Stack Overview&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Next.js App Router&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Next.js API Routes, SQLite with Knex for database operations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication:&lt;/strong&gt; NextAuth&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Styling:&lt;/strong&gt; TailwindCSS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Docker and Coolify on a VPS&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Building the Application&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;1. Setting Up Next.js and the App Router&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Vid4Pro uses the Next.js App Router to handle routing and API endpoints. The app is structured with folders representing routes, making it easy to create dynamic pages.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;2. Database Integration with SQLite and Knex&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;For simplicity and ease of deployment, I chose SQLite as the database. I used Knex.js to handle database queries, allowing me to perform migrations and queries efficiently.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Migration Example:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;up&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;knex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;knex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createTable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;videos&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;table&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;increments&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="nx"&gt;table&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;url&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;notNullable&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="nx"&gt;table&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;analysis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;notNullable&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="nx"&gt;table&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;timestamps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;3. User Authentication with NextAuth&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;NextAuth makes user authentication straightforward. It integrates seamlessly with Next.js, allowing for both email/password and OAuth-based authentication.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;4. Styling with TailwindCSS&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;TailwindCSS made it easy to create a responsive UI. It also helped build components like the dock menu, giving the app a polished look.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;5. Deploying with Docker and Coolify&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;To make deployment manageable, I containerized the application using Docker. Then, I used Coolify for one-click deployment to my VPS, simplifying the process.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Challenges Faced and Lessons Learned&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Management:&lt;/strong&gt; Handling large amounts of YouTube data efficiently required optimizing SQLite queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication:&lt;/strong&gt; Implementing tiered access with NextAuth took some tweaking but proved to be flexible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Docker and Coolify made deployment smoother, but fine-tuning for production was essential. Also, its essential to persist a storage so that your sqlite db isnt wiped on every deployment. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I plan to implement batch analysis, API access for integrations, and more advanced insights extraction in future updates.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Try It Out and Share Your Thoughts!&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Check out Vid4Pro and let me know what you think. Feedback is welcome as I continue to improve the application!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Deploy a Wordpress to Google Cloud for free</title>
      <dc:creator>martin2844</dc:creator>
      <pubDate>Wed, 19 Jan 2022 19:59:31 +0000</pubDate>
      <link>https://dev.to/martin2844/deploy-a-wordpress-to-google-cloud-for-free-46cf</link>
      <guid>https://dev.to/martin2844/deploy-a-wordpress-to-google-cloud-for-free-46cf</guid>
      <description>&lt;p&gt;So, after reading for a bit, there arent any really good free hosting solutions for wordpress sites. &lt;strong&gt;Really, all of them have a tradeoff&lt;/strong&gt;. Either no SSL, or no custom domain etc.&lt;/p&gt;

&lt;p&gt;Well, there is an answer to this. Since there are free VM instances available, you can launch a wordpress site via an instance. You can use whichever you like. Both google and amazon provide free tier VM machines for a year. And they are both really good.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to get a VM
&lt;/h2&gt;

&lt;p&gt;Now, in both AWS and Google Compute you can launch a Virtual Machine (VM) with a custom image already set for wordpress, but its more expensive than a normal ubuntu image, and of course you wont be able to customize it as much.&lt;/p&gt;

&lt;p&gt;So I'll guide you through setting your own wordpress site from the terminal of your VM, that is to say your SSH connection.&lt;/p&gt;

&lt;p&gt;Now, I wont go into much detail about what does what, but if you follow it along it will go well. It helps knowing a bit of bash commands.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating the VM Instance
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;First make a google cloud account, they'll ask for your credit card and they'll charge you a dollar, but thats it. Its just to prevent spam.
&lt;/li&gt;
&lt;li&gt;Go to google compute and launch new instance - The size depends on various factors, but basically it will depend on the size of your website - traffic, amount of storage needed, processing power. etc.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Also allow HTTPS and HTTP traffic.&lt;/p&gt;

&lt;p&gt;Once you decided on your instance size, I chose Micro, wait for your instance to finish creating itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now it might be the time to clarify that you might get a money limit with your free usage, this should be good for the micro instance for about a year&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Press SSH, this I love about google cloud computing. Its not necessary to donwload your keys and putty if your on windows in order to ssh to the VM.&lt;br&gt;
(Image of SSH button)&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FSTEtexH.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FSTEtexH.png" alt="html"&gt;&lt;/a&gt;&lt;br&gt;
Once it finishes connecting it will be like so:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fndx3cPe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fndx3cPe.png" alt="html"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After that, let the fun begin! In order to make a wordpress site we need to set our VM with the correct packages.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;First update and upgrade the VM's apt.&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;sudo &lt;/span&gt;apt update &lt;span class="nt"&gt;-y&lt;/span&gt;
    &lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we need to set up apache! or the famous LAMP&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linux, Apache, MySQL and PHP&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up the LAMP Stack
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;apache2

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

&lt;/div&gt;



&lt;p&gt;Once its done, apache2 should be running, &lt;strong&gt;you can check it by doing the following:&lt;/strong&gt;&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;sudo &lt;/span&gt;systemctl status apache2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should say, its active and running.&lt;/p&gt;

&lt;p&gt;if its not running do the following:&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;sudo &lt;/span&gt;systemctl start apache2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should be able to check it by copying the VM IP adress and pasting it to your browser's nav bar, it should show you the default LAMP page. &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Make sure you are not forcing HTTPS on the IP adress. That is not yet set, so it wont work if you do that. *&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;This is your IP adress:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FYixp6Rn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FYixp6Rn.png" alt="html"&gt;&lt;/a&gt;&lt;br&gt;
This is the stock LAMP page:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FwBn0Wzy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FwBn0Wzy.png" alt="html"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to guarantee that the service will be always execute the following command:&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;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;apache2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the VM is restarted, it should start apache2 right away.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing the Wordpress Database (MariaDb)
&lt;/h2&gt;

&lt;p&gt;Now we are going to install the DB. We are going with MARIADB this time.&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;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;mariadb-server mariadb-client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are installing both client and server, the mariadb-server is to setup our DB server, and the client we needed to be able to connect to it.&lt;/p&gt;

&lt;p&gt;Now start the DB server&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;sudo &lt;/span&gt;systemctl start mariadb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again, check it with status&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;sudo &lt;/span&gt;systemctl status mariadb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Should be up and running.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring the DB
&lt;/h3&gt;

&lt;p&gt;Go for the following command:&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;sudo &lt;/span&gt;mysql_secure_installation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hit enter for the prompt that says enter current password for root, since we havent set any yet.&lt;/p&gt;

&lt;p&gt;Type Y, for the Set root password prompt!&lt;/p&gt;

&lt;p&gt;Set a password and remember it, its important.&lt;/p&gt;

&lt;p&gt;And select Y for remove anonymous user, also Y for disallow root login remotely, and Y again for test DB removal, and privilege reload.&lt;/p&gt;

&lt;p&gt;Reload mariadb now:&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;sudo &lt;/span&gt;systemctl restart mariadb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installing PHP Dependencies
&lt;/h2&gt;

&lt;p&gt;Now we need to install a couple of PHP things, this is needed for wordpress which is, basically, PHP.&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;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;php php-mysql php-gd php-cli php-common
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Downloading the wordpress files
&lt;/h2&gt;

&lt;p&gt;We need to have wget and unzip first. Wget most probably will be there allready but not unzip. So just do the following:&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;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;wget unzip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once its done, we will donwload wordpress:&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;sudo &lt;/span&gt;wget https://wordpress.org/latest.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will download the latest version of wordpress. But its a zip, so lets go ahead and unzip it.&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;sudo &lt;/span&gt;unzip latest.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will generate a wordpress directory, check it by using the "ls" command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Now Transfer wordpress to the correct folder!
&lt;/h3&gt;

&lt;p&gt;Copy the whole directory to the Apache2 folder.&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;sudo cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; wordpress/&lt;span class="k"&gt;*&lt;/span&gt; /var/www/html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That will transfer all the files to the Apache root folder.&lt;br&gt;
Now cd to that folder:&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; /var/www/html
    &lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should have all the files there. And now we have to change the owner properties of the files to let apache use them:&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;sudo &lt;/span&gt;chwon www-data:www-data &lt;span class="nt"&gt;-R&lt;/span&gt; /var/www/html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, to access the website we need to remove the default page, inside /var/www/html, remove the index.html which was the default apache page&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;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now go to your IP adress again, and you should get the wordpress installation site! Well done!&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up Wordpress
&lt;/h2&gt;

&lt;p&gt;But were not there yet, just a bit more. So click your language, click on lets go! and we'll put in the info needed to make wordpress work&lt;/p&gt;

&lt;p&gt;So you'll need to set the DB for wordpress.&lt;/p&gt;

&lt;p&gt;Back to the SSH terminal -&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;sudo &lt;/span&gt;mysql &lt;span class="nt"&gt;-u&lt;/span&gt; root &lt;span class="nt"&gt;-p&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will ask your root password which I told you to remember, remember?&lt;/p&gt;

&lt;p&gt;Enter it, and you should be inside MariaDB.&lt;/p&gt;

&lt;p&gt;So we now will create a DB for wordpress:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    create database wpdb;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;wpdb can be anything you wish and desire, it can be wordpressdb, wordpress, database....&lt;/p&gt;

&lt;p&gt;So now we need to create a user,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    create user "user"@"%" identified by "password";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You guessed it, replace user and password for whichever user and password you choose to use.&lt;/p&gt;

&lt;p&gt;Now provide access for the new user to the DB&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    grant all privileges on wpdb.* to "user"@"%";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now exit by:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, provide the information to the wordpress page which was asking for it.&lt;/p&gt;

&lt;p&gt;Database name: wpdb&lt;br&gt;
username: user&lt;br&gt;
password: password&lt;br&gt;
Database Host: localhost&lt;br&gt;
table prefix: wp_&lt;/p&gt;

&lt;p&gt;Click Submit and you should be successful.&lt;/p&gt;

&lt;p&gt;You might get a message that it was not able to write it. And it will give you a php code to put in manually. To do this, copy the code, and back in your terminal, you should still be in the Apache folder, run the following:&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;sudo &lt;/span&gt;nano wp-config.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once inside, delete everything and paste the code you copied. Then just &lt;code&gt;CTRL-X&lt;/code&gt; to exit, and &lt;code&gt;Y&lt;/code&gt; to save.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thats it.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Go back to the page, and click to continue, and run the installation. You should be on a normal wordpress installation.&lt;/p&gt;

&lt;p&gt;Site title: Whatever&lt;br&gt;
username: your user to access the wordpress admin area&lt;br&gt;
password: your desired password.&lt;/p&gt;

&lt;p&gt;email: an email to recover password and get notifications.&lt;/p&gt;

&lt;p&gt;After that, login into wordpress and voilá your done.&lt;/p&gt;

&lt;p&gt;We are just missing a custom domain, and SSL configuration. But thats for another post.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>deploy</category>
      <category>google</category>
      <category>lamp</category>
    </item>
  </channel>
</rss>
