Nginx or Apache?
Apache has been around since 1995 and powers more websites than any other software. However, under heavy load performance hits a bottleneck and ultimately suffers. Nginx, Engine X, was designed to address some of these issues. If you’ve been on a shared host, chances are you’ve been using Apache. We’re going to setup Nginx – hey, performance matters. We might as well do it right, right?
The first thing you’re going to want to do is ssh into your server.
Nginx is part of the Ubuntu core repositories, which means we can use the
apt package manager for a sleek installation.
sudo apt-get update sudo apt-get install nginx
The first thing we’re going to want to do is update the local index before installing nginx. You’ll be asked to confirm the installation. Type
Y to begin.
Hosting a website is awesome but rarely simple. Often you get poor performance and expensive costs just for going down the “setup my hosting for me” route. Instead, I’ll show you how you can get back control and performance for nothing more than the cost of a month’s lunch.
First things first, forget those hosts who promise you everything, unlimited this, emails that. They are bloated, expensive and the shared drives are simply useless. Instead, let me introduce you to Digital Ocean.
Digital Ocean have become my goto hosting provider for 3 main reasons.
- Speed – You can have a server up and running within a minute (really)
- Performance – You can optimise the entire stack (and all their servers are SSD)
- Price – $5 (£4) a month is all it takes. What else can you buy for that?
Infinity is a brilliant abstract concept. Perhaps my favourite. It envisions something so vast that it is arguably inconceivable.
However, there are theorems that are designed to make complex ideas much simpler to understand.
A monkey, if given an infinite amount of time randomly hitting keys on a typewriter will almost surely type out the complete works of Shakespeare.
Having a reliable WordPress system backup is important, having it outside the application is even more so. Combine that with full control and we have something pretty awesome going on.
The file structure I like to have is:
www/ backups/ <-- Backup location html/ <-- WordPress location scripts/ backup.sh <-- This file
And we will create the backup.sh script. This assumes that you have the WP CLI and tar utilities installed.
Notify is my take on what a notification library should be.
So this is just another library I need to pull in? Absolutely, and your users will love you for it.
Anyone who has never made a mistake has never tried anything new.— Albert Einstein