mirror of
https://gh.wpcy.net/https://github.com/szepeviktor/wordpress-website-lifecycle.git
synced 2026-04-24 05:09:10 +08:00
35 lines
741 B
Markdown
35 lines
741 B
Markdown
# Installation with WP-CLI
|
|
|
|
`wp-cli.yml`
|
|
|
|
```yaml
|
|
path: WP-ROOT
|
|
url: WP-HOME-URL
|
|
debug: true
|
|
user: viktor
|
|
core update:
|
|
locale: hu_HU
|
|
skip-plugins:
|
|
# Version randomizer
|
|
- better-wp-security
|
|
```
|
|
|
|
WP-CLI commands.
|
|
|
|
```bash
|
|
# Existing database
|
|
./wp-createdb.sh
|
|
|
|
# New installation
|
|
wp core download --locale=hu_HU
|
|
wp core config --dbname="$DBNAME" --dbuser="$DBUSER" --dbpass="$DBPASS" \
|
|
--dbhost="$DBHOST" --dbprefix="prod" --dbcharset="$DBCHARSET" --extra-php <<EOF
|
|
// Extra PHP code
|
|
EOF
|
|
wp core install --title="WP" \
|
|
--admin_user="viktor" --admin_email="viktor@szepe.net" --admin_password="12345"
|
|
|
|
wp option update home "WP-HOME-URL"
|
|
wp option update blog_public 0
|
|
wp option update admin_email "webmaster@example.com"
|
|
```
|