Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leoloso/wp-install
Quickly install WordPress through Composer and WP-CLI
https://github.com/leoloso/wp-install
bootstrap composer wordpress
Last synced: 2 months ago
JSON representation
Quickly install WordPress through Composer and WP-CLI
- Host: GitHub
- URL: https://github.com/leoloso/wp-install
- Owner: leoloso
- License: mit
- Created: 2019-07-28T16:46:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-03T18:30:56.000Z (over 5 years ago)
- Last Synced: 2024-10-12T13:33:43.988Z (3 months ago)
- Topics: bootstrap, composer, wordpress
- Language: Shell
- Homepage:
- Size: 34.2 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Install WordPress through Composer and WP-CLI
Quickly launch a WordPress instance through Composer and WP-CLI
## Install
Via [Composer](https://getcomposer.org) and [WP-CLI](https://wp-cli.org/) (both are assumed to be installed globally):
1. Create the [WordPress database and user](https://wordpress.org/support/article/how-to-install-wordpress/#step-2-create-the-database-and-a-user)
2. Configure WordPress through environment variables:> Copy the code below to an editor, replace all values (such as `{YOUR_SITE_DB_NAME}`) with your own values, and then either paste it on the terminal to execute, or save it in file "~/.bash_profile" and then execute `source ~/.bash_profile`.
```bash
export DB_NAME={YOUR_SITE_DB_NAME} #eg: database
export DB_USER={YOUR_SITE_DB_USER} #eg: admin
export DB_PASSWORD={YOUR_SITE_DB_PASSWORD} #eg: sADF!kl9diq@#Sjfk
export DB_HOST={YOUR_SITE_DB_HOST} #eg: 127.0.0.1
export SITE_URL_WITHOUT_HTTP={YOUR_SITE_URL_WITHOUT_HTTP} #eg: localhost
export SITE_URL_WITH_HTTP={YOUR_SITE_URL_WITH_HTTP} #eg: http://localhost
export SITE_NAME="{YOUR_SITE_NAME}" #eg: "My awesome website"
export ADMIN_USER={ADMIN_USER} #eg: admin
export ADMIN_PASSWORD={ADMIN_PASSWORD} #eg: JKo$@sfjASD00w
export ADMIN_EMAIL={ADMIN_EMAIL} #eg: [email protected]
```To set the SALT keys there are two alternatives:
I. Set random values through environment variable `SHUFFLE_SALT_KEYS`:
```bash
export SHUFFLE_SALT_KEYS=true
```II. Set the corresponding values directly:
```bash
# Obtain random values from https://api.wordpress.org/secret-key/1.1/salt
export AUTH_KEY={YOUR_AUTH_KEY}
export SECURE_AUTH_KEY={YOUR_SECURE_AUTH_KEY}
export LOGGED_IN_KEY={YOUR_LOGGED_IN_KEY}
export NONCE_KEY={YOUR_NONCE_KEY}
export AUTH_SALT={YOUR_AUTH_SALT}
export SECURE_AUTH_SALT={YOUR_SECURE_AUTH_SALT}
export LOGGED_IN_SALT={YOUR_LOGGED_IN_SALT}
export NONCE_SALT={YOUR_NONCE_SALT}
```3. Bootstrap a new project from this repo:
```bash
composer create-project leoloso/wp-install
```4. Wait for a few minutes ☕️😁
5. ✅ The site is installed under:- 👉WordPress site: `{YOUR_SITE_URL_WITH_HTTP}`
- 👉WordPress admin: `{YOUR_SITE_URL_WITH_HTTP}/wp/wp-admin/`## Credits
- [Leonardo Losoviz][link-author]
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
[link-author]: https://getpop.org