Skip to content

Instantly share code, notes, and snippets.

@joelataylor
Last active January 11, 2016 02:24
Show Gist options
  • Save joelataylor/e97cc803ba4460bcbbae to your computer and use it in GitHub Desktop.
Save joelataylor/e97cc803ba4460bcbbae to your computer and use it in GitHub Desktop.
Server Setup Notes

Purchase Server - [Digital Ocean] (https://www.digitalocean.com/)

Start here: https://codeable.io/community/how-to-set-up-wordpress-vps/

  • Create new webmaster user & admin group:
$ groupadd admin
$ adduser webmaster --ingroup admin
  • Setup/copy SSH keys
$ mkdir /home/webmaster/.ssh
$ mv /root/.ssh/authorized_keys /home/webmaster/.ssh/
$ chown -R webmaster:admin /home/webmaster/.ssh/
  • Install Nginx, PHP & MariaDB
  • Missing PHP extensions: apt-get install -y php5-fpm php5-common php5-cli php-pear php5-dev php5-tidy php5-xmlrpc php5-xsl php5-curl php5-oauth php5-mysqlnd php5-mcrypt php5-intl php5-imagick php5-geoip php5-apcu

MariaDB Tasks

  • MariaDB issue fix: no root password is asked, run: sudo mysql_secure_installation.
  • Now you can only login as root linux user, so run this:
	sudo mysql -u root

	[mysql] use mysql;
	[mysql] update user set plugin='' where User='root';
	[mysql] flush privileges;
	[mysql] \q
  • Create stage and prod users: CREATE USER 'stage_user'@'localhost' IDENTIFIED BY '?????';
  • Create stage and prod dbs: CREATE DATABASE stage;
  • Add user to stage and prod dbs: GRANT ALL PRIVILEGES ON stage.* TO 'stage_user'@'localhost';

Custom SMTP Settings with SSMTP & MailGun

  • sudo apt-get install -y ssmtp
  • sudo vim /etc/ssmtp/ssmtp.conf
root=postmaster@daomin.com
mailhub=smtp.mailgun.org
rewriteDomain=domain.com
hostname=wegrowhair
AuthUser=postmaster@mailgun.domain.com
AuthPass=???
UseTLS=YES
UseSTARTTLS=YES

Keep Going!

Setup WordPress

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment