leoloso / pop-app-wp
Bootstrap a PoP Application for WordPress
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 1
Open Issues: 0
Type:project
Requires
- php: ~7.1
- getpop/base36definitionresolver: dev-master
- getpop/component-model-configuration: dev-master
- getpop/emojidefinitionresolver: dev-master
- getpop/persistentdefinitions: dev-master
- getpop/spa: dev-master
- johnpbloch/wordpress: >=5.3
- leoloso/pop-api-wp: ^1.6
README
Project to install a PoP application running on WordPress.
Install
Via Composer and WP-CLI (both are assumed to be installed globally):
- Create the WordPress database and user
- 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 executesource ~/.bash_profile
.
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: pedro@example.com
To set the SALT keys there are two alternatives:
I. Set random values through environment variable SHUFFLE_SALT_KEYS
:
export SHUFFLE_SALT_KEYS=true
II. Set the corresponding values directly:
# 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}
- Bootstrap a new project from this repo:
composer create-project leoloso/pop-app-wp
-
Wait for a few minutes ☕️😁
-
Execute
install
again to copy the WordPress must-use plugins under folder/mu-plugins
(somehow it doesn't do it withcreate-project
).cd
into the project's folder (by default"pop-app-wp"
) and execute:
$ composer install
- ✅ The site is installed under:
- 👉WordPress site:
{YOUR_SITE_URL_WITH_HTTP}
- 👉WordPress admin:
{YOUR_SITE_URL_WITH_HTTP}
/wp/wp-admin/ - 👉PoP API:
{YOUR_SITE_URL_WITH_HTTP}/api/?query=fullSchema
Configure application options (optional)
Upon installation, the Composer script will create file config/.env
including default values for application options (passed as environment variables). You can further edit this file, or even create more specific ones (following Symfony's Dotenv component's file hierarchy).
Installed Components
This bootstrapper will install the following components (for WordPress):
Coming soon...
Usage
Coming soon...
Credits
License
The MIT License (MIT). Please see License File for more information.