Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antonk52/wp-preset
https://github.com/antonk52/wp-preset
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/antonk52/wp-preset
- Owner: antonk52
- Created: 2015-09-23T06:47:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-21T16:32:47.000Z (over 7 years ago)
- Last Synced: 2024-07-05T13:22:38.048Z (2 months ago)
- Size: 29.3 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WP preset
Instead of pulling an outdated plugins and wp version from github, please install [WP-CLI](http://wp-cli.org/) and now with a simple aliase you can download the latest wordpress version with all the plugins you need and install it with set parameters with a single command.
Make sure that WP-CLI is insatlled
With an assumption that all your wordpress installs are stored in `/Documents/mamp/`, MAMP is pointed to the same directory and the databases are called `wp_` plus the same name as the folder for the wordpress install. With that in mind we can add following to the `.bashrc` file.
```bash
newwp() { cd ~/Documents/mamp/; # make sure that we are in our wordpress' folder
mkdir $1; # create a new directory for the fresh install
cd $1; # cd into the directory
wp core download; # download wordpress core files
wp core config --dbname=wp-$1 --dbuser=root --dbpass=root --dbhost=localhost --dbprefix=wp_; # edit wp-config.php to set database name, username, password, host and database prefix
wp db create wp_$1; # create a new database
wp core install --url=http://localhost --title="$1" --admin_user=super --admin_password=super --admin_email="[email protected]"; # perform the instalation routine, your admin credentials are super:super
wp theme delete twentyfourteen;
wp plugin delete akismet;
wp plugin install updraftplus woocommerce what-the-file wp-html-compression; # install plugins
}
alias newwp='newwp '
```Now with a simple `newwp amazing` we will have a fresh wordpress install, with already installed plugins and all with a single command.