Overview
There are two recommended ways to set up a local environment for working on the Web Stories plugin:- Docker Container (recommended) - Command-line setup using the provided Docker configuration, also used for E2E tests
- Local by Flywheel - Easy-to-use GUI application
Local by Flywheel makes it easy to switch PHP & WordPress versions and supports HTTPS. HTTPS is required for some features like video optimization to work properly.
Docker Container Setup
The quickest way to get up and running is to use the provided Docker setup.Starting the Environment
Start Docker
The following command will automatically verify whether Docker is configured properly and start the local WordPress instance:This script:
- Checks Docker installation and configuration
- Launches containers via
bin/local-env/launch-containers.sh - Installs WordPress via
bin/local-env/install-wordpress.sh - Activates the Web Stories plugin
Access WordPress
The WordPress installation will be available at:
- Site URL:
http://localhost:8899 - Admin URL:
http://localhost:8899/wp-admin - Username:
admin - Password:
password
Managing the Environment
Specifying PHP Version
You can run the local environment with different PHP versions:Docker Configuration
The Docker setup is configured inbin/local-env/:
docker-compose.yml- Docker services configurationstart.sh- Main startup scriptstop.sh- Shutdown scriptlaunch-containers.sh- Container launch logicinstall-wordpress.sh- WordPress installation scriptincludes.sh- Shared utility functionsuploads.ini- PHP upload configuration
bin/local-env/docker-compose.yml for the complete Docker configuration.
Custom Environment Setup
If you prefer using tools like Local by Flywheel, you can clone this repository directly into yourwp-content/plugins directory:
Using Symlinks
Symlinks work well if you prefer having your Git projects in a different location or want to use the plugin on multiple environments:When using a custom environment, make sure to run
composer install and npm install in the plugin directory, then build the assets with npm run build:js or npm run dev.Local by Flywheel Setup
Install Local
Download and install Local by Flywheel
Create a New Site
- Open Local and create a new WordPress site
- Choose your preferred PHP version (7.4+)
- Select WordPress version (latest recommended)
- Enable HTTPS for full feature support
Troubleshooting
Docker Issues
Port conflicts: If port 8899 is already in use, you can modify the port inbin/local-env/docker-compose.yml.
Permission issues:
Ensure Docker has permission to access your project directory.
Composer not in PATH:
WSL-Specific Issues
Missing make command:Next Steps
Architecture
Learn about the project structure
Testing
Run tests in your local environment
Contributing
Start making contributions