implemented multisite
This commit is contained in:
42
README.md
42
README.md
@@ -1,43 +1,3 @@
|
||||
# Selig
|
||||
|
||||
Selig is a Docker project to set-up two Wordpress servers, one for a league, one for a team. It uses Caddy for the webserver and a single MariaDB instance for the server.
|
||||
|
||||
Each Wordpress instance setups their own database within the MariaDB instance.
|
||||
|
||||
## Setup
|
||||
### Environment Files
|
||||
There are two environment files, one at the project root and one under each WordPress folder ([cmbabaseball](./cmbabaseball/.env), [chihounds](./chihounds/.env)).
|
||||
|
||||
### Init
|
||||
Each WordPress site has an `wp-install.sh` script ([cmbabaseball](./cmbabaseball/wp-install), [chihounds](./chihounds/wp-install)). It creates the database and install Wordpress using the common `wp-admin` user info provided in the project root via a ephemeral wp-cli container. (Theoretically, this probably can be changed by overwriting the environment variables in the website-specific env file, but I didn't test that and I don't know what the order would have to be). It also preinstalls a list of plugins as defined in the site's .env.
|
||||
|
||||
Currently, the scripts are exactly the same, so they are symbolic links to the shared directory.
|
||||
|
||||
```sh
|
||||
./cmbabaseball/init-wordpress
|
||||
./chihounds/init-wordpress
|
||||
```
|
||||
|
||||
OR
|
||||
|
||||
```sh
|
||||
./*/init-wordpress
|
||||
```
|
||||
|
||||
### Import
|
||||
Since I was starting from a couple of existing sites, each WordPress site has an `import-wordpress.sh` ([cmbabaseball](./cmbabaseball/import-wordpress.sh), [chihounds](./chihounds/import-wordpress.sh)). These have been packaged as a `import.sql` DB export and a `import-uploads.tgz` archive of the uploads folder.
|
||||
|
||||
```sh
|
||||
./cmbabaseball/wp-import.sh
|
||||
./chihounds/wp-import.sh
|
||||
```
|
||||
OR
|
||||
```sh
|
||||
./*cmbabaseball*/wp-import.sh
|
||||
```
|
||||
|
||||
### Tying it together
|
||||
To put it together succintly, you can run the following to do all the init scripts, then the import scripts.
|
||||
```sh
|
||||
/*/wp-install.sh && ./*/wp-import.sh
|
||||
```
|
||||
Selig is a Docker project to set-up two Wordpress servers, one for a league, one for a team using Wordpress multisite. It uses Caddy for the webserver and a single MariaDB instance for the server.
|
||||
|
||||
Reference in New Issue
Block a user