vegangirlthatcodes
2/27/2018 - 11:23 AM

Download and install Wordpress and create new theme with Sage 8

Quickly download the latest Wordpress tar.gz and unzip it via SSH. Download and install Sage 8 on a new theme

# # # #  # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#                           WORDPRESS
#
# # # #  # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Inside your project folder, download Wordpress
# To install wget in case you don't have it: brew install wget
wget http://wordpress.org/latest.tar.gz

# Unzip it
tar xfz latest.tar.gz

# Since all the files are inside the Wordpress folder we need to move them back to the root of the project
mv wordpress/* ./

# Remove Worpdress empry folder and the tar.gz file
rmdir ./wordpress/
rm -f latest.tar.gz


# All commands
wget http://wordpress.org/latest.tar.gz
tar xfz latest.tar.gz
mv wordpress/* ./
rm -f latest.tar.gz


# # # #  # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#                           CREATE DB
#
# # # #  # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 
# Return to root
cd
 
# Login to the MySQ command-line using the following command:
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
 
#Now you can use the MySQL command line. For exmaple to show all your databases:
show databases;
 
 
# Create database
create database dbname;
 
#since we're using mamp, username root with password root is automattically added to the database
 
#Now you can exit the MySQL command-line by typing 'exit'.
exit

# All commands
cd
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
create database dbname;
exit


# # # #  # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#                           INSTALL WORDPRESS
#
# # # #  # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 
# Now open the project in your browser and run the usual WordPress install.
http://localhost:8888/project-name
 
# use the database name we created previously on the database settings



# # # #  # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#                           SAGE 8
#
# # # #  # # # # # # # # # # # # # # # # # # # # # # # # # # # #

#install gulp and Bower globally if you haven't yet.
npm install -g gulp bower

# Go to themes folder
cd wp-content/themes

# Create project with sage 8
composer create-project roots/sage your-theme-name 8.5.4

# Go to theme folder
cd your-theme-name

#instal npm dependencies
npm install

# instal bower dependencies
bower install


#To use BrowserSync during gulp watch you need to update devUrl at the bottom of assets/manifest.json to reflect your local development hostname
# example "devUrl": "http://localhost:8888/project-name/"


#Login into your website admin panel and change the theme to the newly created one

#after you finish this you can run gulp watch to open your project on the browser.
gulp watch

# Happy codding <3







#https://github.com/sass/node-sass/issues/1764