What does this repository offer?
- A fully debuggable WordPress docker instance
- Limit of upload_max_filesize increased to upload plugins with high filesize
git clone https://github.com/dhakalananda/wp-xdebug-docker
cd wp-xdebug-docker
docker-compose up -d
- Navigate to http://localhost:8000 and set up WordPress
XDebug is listening on port 9000. Use your preferred IDE to attach to the listener.
For some Mac devices, using the docker-compose might install AMD version so:
git clone https://github.com/Automattic/wordpress-xdebug
cd wordpress-xdebug
docker build -t wp-debug:latest .
cd
git clone https://github.com/dhakalananda/wp-xdebug-docker
cd wp-xdebug-docker
- Replace the
image: automattic/wordpress-xdebug:latest
withimage: wp-debug:latest
in the docker-compose.yaml file docker-compose up -d
- Navigate to http://localhost:8000 and set up WordPress
- Install Dev Container & PHP Debug VSCode plugin
- Use the Connect to option and Attach to running container
- Select the WordPress container
- Create a launch.json file and attach to 9000 port
Example launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9000
}
]
}
For more info: https://code.visualstudio.com/docs/devcontainers/attach-container
This repo makes use of https://github.com/Automattic/wordpress-xdebug image