sh 下载并安装Wordpress并使用Sage 8创建新主题

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 下载并安装Wordpress并使用Sage 8创建新主题相关的知识,希望对你有一定的参考价值。

# # # #  # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#                           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
  

以上是关于sh 下载并安装Wordpress并使用Sage 8创建新主题的主要内容,如果未能解决你的问题,请参考以下文章

sh 使用Roots / Sage框架和VirtualHost创建的WordPress安装

sh 通过SSH下载并安装Wordpress

sh 安装并激活WooCommerce和Storefront的新WordPress站点。您必须安装Laravel Valet或Valet +

Wordpress下载后怎么打开安装?

sh Wordpress:Bash安装脚本 - 下载最新的WP版本,使用用户提供的数据库名称,用户名和密码更新wp-config,创建

sh Wordpress:Bash安装脚本 - 下载最新的WP版本,使用用户提供的数据库名称,用户名和密码更新wp-config,创建