Install Docker, then:
chmod +x *.sh
docker-compose up
./setup.sh
open http://localhost:8000
docker-compose up
open http://localhost:8000
URL | Description |
---|---|
http://localhost:8000 | Home |
http://localhost:8000/wp-login.php | Admin Login |
http://localhost:8001 | Webgrind |
Key | Value |
---|---|
Host | localhost |
Port | 3308 |
User | wordpress |
Password | wordpress |
Database | wordpress |
npm install -g sass
sass wp-avorg-plugin/style/style.scss wp-avorg-plugin/style/style.css
If you use an IDE like PhpStorm you can set up a file watcher to do this automatically.
docker-compose run webpack npm run build
Command | Description |
---|---|
docker-compose build --pull --no-cache |
Force image updates; update WordPress |
docker exec wp-avorg-dev_wordpress_1 /bin/bash -c 'cd /usr/src/wordpress && ls' |
Run command from outside container |
docker exec -it wp-avorg-dev_wordpress_1 bash |
Jump into machine |
Command | Description |
---|---|
./wp.sh |
Jump into WordPress container |
./wp.sh plugin list |
List installed plugins |
Command | Description |
---|---|
ctrl+p+q or exit |
Jump out of machine |
prentenv |
See all env vars, including Docker's |
Disable the following options in preferences:
- Force break at first line when no path mapping specified
- Force break at first line when a script is outside the project
Validate your installation of Xdebug. You should see something like this:
In Preferences > Languages & Frameworks > PHP > Servers
, turn on the following setting for localhost
:
Use path mappings (select if the server is remote or symlinks are used)
Then set the server path for wp-avorg-dev/wp-avorg-plugin
to the following path:
/var/www/html/wp-content/plugins/wp-avorg-plugin
Install the Xdebug helper Chrome extension, enable debug mode, and tell PhpStorm to start listening for connections. Then you're ready to start adding breakpoints and debugging your code.