|Kim Grytøyr 3c1037e8c4||3 weeks ago|
|support||3 weeks ago|
|.devcontainer.json||3 weeks ago|
|README.md||3 weeks ago|
|docker-compose.yml||3 weeks ago|
Disclaimer: This project is meant to be used for development purposes only. It’s not meant to be used in production.
It’s also work in progress. Feel free to contribute if you have anything useful to add.
This repository is meant to be opened by Visual Studio Code using the Visual Studio Code Remote - Containers extension and it requires Docker to work.
Remote-Containers: Open Folder in Container
Thats it! You should now have a database server and Wordpress running in separate containers. Linting and formatting adhering to the WordPress Coding Standard should just work. You can also run the default debug configuration using Xdebug.
Visit your WordPress site at http://localhost:8000.
The container has been configured to not run Xdebug when using PHP from the command line. This is to prevent it from being used when PHP-Sniffer is triggered, since it will drastically slow down the linter and the formatter.
Here’s how to start a debug session:
Listen for XDebug
9000(click the refresh arrow to make it appear)
Note: When you stop the debugging session, make sure to disable forwarding of port
9000, or else the page will appear to hang.
If you’re developing a plugin or a theme and you have that project locally on your computer, just add them as volumes in the
docker-compose.yml file below the
wp_root volume, like this:
volumes: - wp_root:/var/www/html - /opt/dev/awesome-plugin:/var/www/html/wp-content/plugins/awesome-plugin
..assuming you have the plugin in the local folder