Skip to content

Dumping ground for some Nginx configurations that I used for a variety of things.

Notifications You must be signed in to change notification settings

cameronterry/nginx-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A dumping ground for a variety of Nginx configurations which have used in one or another.

Ubuntu utilities

Some may come already installed but if not, this should cover it. Please note this for Ubuntu 16.04.

sudo apt-get install -y curl git letsencrypt mailutils software-properties-common wget zip unzip

Useful Commands

sudo nginx -t

Let's Encrypt

Based on the parts/letsencrypt.conf, the following command should be used to get the SSL certificate. This is based on the /srv/letsencrypt/ folder already exists.

Note; CertBot will automatically create the ".well-known/" folder.

sudo letsencrypt certonly --webroot -w /srv/letsencrypt/ -d DOMAIN

WordPress CLI - Fresh Installation

Ensure that the word "wordpress" is replaced by the actual name of your website. Especially useful if you wish to install multiple websites.

Created folder

mkdir /srv/wordpress/
cd /srv/wordpress/

Install WordPress

wp core download --locale=en_GB
wp core config --prompt
wp core install --prompt
wp plugin install advanced-custom-fields jetpack redirection redis-cache regenerate-thumbnails rewrite-rules-inspector wordfence wordpress-seo wp-crontrol
wp core language update

sudo chown www-data:www-data -R wp-content/uploads

Configure WordPress

wp media regenerate
wp redis enable
wp user update [email protected] --user_pass=

Misc other useful commands

Install and update plugin from Github (WP-CLI is smart enough to remove the "-release" part of the folder name as well!)

wp plugin install https://github.com/cameronterry/dark-matter/archive/master.zip
wp plugin install --force https://github.com/cameronterry/dark-matter/archive/master.zip

About

Dumping ground for some Nginx configurations that I used for a variety of things.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages