Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toggenation/deploy-site
Script to deploy an nginx / php-fpm / wordpress / divi site
https://github.com/toggenation/deploy-site
Last synced: 9 days ago
JSON representation
Script to deploy an nginx / php-fpm / wordpress / divi site
- Host: GitHub
- URL: https://github.com/toggenation/deploy-site
- Owner: toggenation
- License: mit
- Created: 2021-04-10T12:01:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T22:31:36.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T13:38:36.906Z (3 months ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Deploy a site
This script deploys a Wordpress site with the following
* Adds a linux user so php-fpm can run as a user
* Create /var/www/username/ folder tree and sets perms to the created linux user
* Copies an nginx conf template to /etc/nginx/conf.d and modifies it
* Copies a template php-fpm.conf to /etc/php-fpm.d/ and modifies it
* uses certbot to create a letsencrypt SSL cert using --nginx plugin
* Adds the Divi theme to wordpress
* Create a Divi Child Theme
* Create a MySQL DB and user
* Downloads and unpacks to the web root the latest wordpress
* Modifies the Wordpress wp-config.php with:
* Database user details
* wp-config security salts## Requires
* pwgen
* certbot with nginx plugin## How to use
```sh
cp env.example env
```Edit env and add the linux user and website domain
```sh
# new user name linux
NEW_USER=exuser# domain name
NEW_DOMAIN=exampledomain.com.au
```Run the script
```sh
export MYSQL_ROOT_PASS=MySuperSecretMySQLRootPassord
./deploy-site.sh
```To remove the DB, directories and conf and start again
```sh
./deploy-site.sh remove
```