WordPress Theme Dev setup Ubuntu, SSH, Underscore, WP-Gulp

SSH

  chmod 400 ./PATH/KEYNAME.pem
# or 
  chmod 600 ./PATH/KEYNAME.pem
ssh -i ./PATH/KEYNAME.pem [email protected]://REMOTEURL  
scp -i ./PATH/KEYNAME.pem [email protected]://REMOTEURL:/var/www/html/REMOTEURL.com/public_html/index.htm /LOCAL/PATH/index.html

Installing WP-CLI + WP Core

WP-CLI is available as a PHP Archive file (.phar).

wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

make this .phar file executable and move it to /usr/local/bin so that it can be run directly:

chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

Check if ti works

wp --info

…just in case , how to install on Mac with homebrew

brew install wp-cli

command to download WordPress

wp core download

Prepare WordPress Database

mysql -u root -p
CREATE DATABASE wordpress;

CREATE USER 'wpuser' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser';
FLUSH PRIVILEGES;

Configure and Install Wordpres

cd /var/www/html/example.com/public_html/

wp core config --dbname='wordpress' --dbuser='wpuser' --dbpass='password' --dbhost='localhost' --dbprefix='wp_'

wp core install --url='http://example.com' --title='Blog Title' --admin_user='adminuser' --admin_password='password' --admin_email='[email protected]'

Create new starter theme with _Uderscores

An alternative to _S

Theme info in CSS

Step 1: Firstly go to wp-content/themes/ folder. And then rename your theme folder to whatever you want.

Step 2: Open your theme folder and open style.css file. In top part of style.css you will see theme name. Rename it and save changes.

Step 3: Go to Wp-admin/appearance/themes and activate your theme under new name.

Automating with WP-Gulp