Categories
JavaScript PHP VSCode WordPress Workflow

Setup VS Code (JS, PHP & WordPress)

VSCode is the most popular code editor but it is not like other IDEs where everything is pre-setup so in this post we will show you to how to setup VS Code for development in different languages. For now we are covering only JS, PHP and WordPress but in future we will extend this guide with more setups.

Note: This guide is specifically written for MacOS users but it is easy to translate commands for other operating systems so feel free to follow this if you are on any other OS

Prerequisites:

  • Verify installation of brew via brew --version and if not available then install it from brew website.
brew version
Categories
DevOps

Add FTP User on AWS EC2 Instance

1. Enable Password Authentication

1.1. Update “PasswordAuthentication:yes” in sshd_config

sudo vi /etc/ssh/sshd_config

1.2. Assign password to main user

sudo passwd [USERNAME] # for ec2 its ubuntu

1.3. Restart sshd service

sudo service sshd restart

2. Configure vsftpd to allow access

Categories
GraphQL

GraphQL – Deep Dive

GraphQL is a declarative data fetching spec that is invented by Facebook and open sourced in 2015. GraphQL uses a special language called query language which looks a lot like JSON objects. GraphQL is an alternative to REST API’s and have following benefits:

  • GraphQL query string is sent to GraphQL server and instead of getting full response from server you only get the data that is needed by you.
  • Query is nested and data is requested at once on single endpoint while in REST there are multiple requests on different endpoints.
  • Backward compatible (new fields can be added without breaking anything and old fields can continue to function)
  • Can wrap around existing API
Categories
DevOps

Learning NGINX

Install NGINX

sudo su -
apt update
apt upgrade
apt install nginx
nginx -v

Confirm NGINX is working by navigation to localhost

NGINX Files and Directories

  • /etc/nginx (Configurations)
  • var/log/nginx (Access and error logs)
  • var/www/html (Default directory)

Commonly Used Commands

systemctl status nginx # check status
systemctl start nginx # start server
systemctl stop nginx # stop server
systemctl is-active nginx
systemctl reload nginx
nginx -h # help
nginx -t # test config without reboot
nginx -T # test config and cat file on screen

Main configuration file of nginx is located in /etc/nginx/nginx.conf (review this) but we will keep our configuration in /etc/nginx/conf.d

Unlink default unlink /etc/nginx/sites-enabled/default

Categories
WordPress

WordPress VIP Go Local Setup

In this post you’ll learn how to setup your local WordPress installation which exactly replicates your preview and production website on VIP Go hosting.

Categories
Workflow

How to install Compass Gem on MacOS?

Compass is a sass-based stylesheet framework that streamlines the creation and maintenance of CSS. Installation of gems required ruby so if you have ruby installed then skip to Installing Compass Gem else continue reading . You can confirm whether ruby is installed or not by

ruby -v
Categories
WordPress

WordPress Setup Using VVV

In this post you are going to learn how to setup WordPress on your local machine using VVV (Varying Vagrant Vagrants) which is a vagrant box that runs virtual machine on system and setup WordPress.