https://github.com/xwp/wp-multisite-subdirectory-nginx
Proof of concept of a WP subdirectory multisite in a subdirectory.
https://github.com/xwp/wp-multisite-subdirectory-nginx
Last synced: 5 months ago
JSON representation
Proof of concept of a WP subdirectory multisite in a subdirectory.
- Host: GitHub
- URL: https://github.com/xwp/wp-multisite-subdirectory-nginx
- Owner: xwp
- Created: 2021-05-24T20:23:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-24T20:24:38.000Z (over 4 years ago)
- Last Synced: 2025-03-30T13:03:38.787Z (10 months ago)
- Language: PHP
- Size: 18.6 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Subdirectory Multisite in a Subdirectory
A proof-of-concept for WordPress subdirectory multisite in a subdirectory of the web root:
- Web server root at `./web`.
- WordPress added as a Composer dependency at `./web/wp`.
- WordPress multisite configured as subdirectory install.
See [`nginx.conf`](nginx.conf) for the relevant Nginx configuration and specifically the rewrite rules.
## Requirements
- Docker
- PHP and Composer
## Setup
1. Install Composer dependencies:
composer install
2. Start the server environment:
composer start
3. Setup the WP sub-directory network:
composer setup
Visit the environment at [subdir.wpenv.net](http://subdir.wpenv.net) or [subdir.wpenv.net:8033](http://subdir.wpenv.net:8033) to view PHPMyAdmin.
Login at [subdir.wpenv.net/wp-login.php](http://subdir.wpenv.net/wp-login.php) using `admin` as username and `password` as password.
Create a new site on the network such as `subdir.wpenv.net/example`:
composer cli -- wp site create --slug=example
and visit its admin area at [subdir.wpenv.net/example/wp-admin/](http://subdir.wpenv.net/example/wp-admin/) while the site is available at [subdir.wpenv.net/example/](http://subdir.wpenv.net/example/).