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 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';
sudo apt-get install -y ssmtp
sudo vim /etc/ssmtp/ssmtp.conf
[email protected]
mailhub=smtp.mailgun.org
rewriteDomain=domain.com
hostname=wegrowhair
[email protected]
AuthPass=???
UseTLS=YES
UseSTARTTLS=YES
- Install [Redis] (https://www.digitalocean.com/community/tutorials/how-to-configure-redis-caching-to-speed-up-wordpress-on-ubuntu-14-04)
- Install [SSL cert] (https://gist.github.com/bradmontgomery/6487319)
- Install [WP-CLI] (http://wp-cli.org/)
- ~/shared/wp-cli.yml:
core config: extra-php: | define( 'WP_CONTENT_DIR', '/home/webmaster/www/artisan/current/content' );
- Setup GitHub/BitBucket keys
- Install [Monit] (https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-monit)
- Setup [Rocket-Nginx] (https://github.com/maximejobin/rocket-nginx)