Skip to content

Commit 9324578

Browse files
doc: readme update
2 parents 5991b70 + 5f2b638 commit 9324578

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

readme.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ This is a basic **Docker WordPress Environment** focused on the development of *
1919
- [Requirements](#requirements)
2020
- [Usage](#usage)
2121
- [Variables](#variables)
22+
- [WordPress Debug](#debug)
23+
- [Xdebug for VSCode](#xdebug)
2224
- [Contributing and Support](#contributing-and-support)
2325

2426
---
@@ -51,7 +53,9 @@ The **wpcli container** was added to only run one-off commands. Don’t need it
5153

5254
## Requirements
5355

54-
- [Docker](https://www.docker.com/) hub installed.
56+
- [Docker](https://www.docker.com/) hub
57+
- [Xdebug](https://xdebug.org/docs/install)
58+
- [PHP Debug Extension](https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug)
5559

5660
## Usage
5761

@@ -75,4 +79,44 @@ Uses the official WordPress latest docker image.
7579

7680
The **wpcli container** was added to only run one-off commands. Don’t need it to run as a service, only as a cli tool, for that run:
7781

78-
`docker-compose run --rm wpcli command`
82+
For using wp-cli, use `docker-compose run --rm wpcli command` as it was added to only run one-off commands
83+
84+
## Debugging in WordPress
85+
86+
The wp-core is synchronized through the docker-composer.yml just in case you need to check and/or debug something. After running `docker-compose up -d`, you will be able to change the [WordPress debug mode](https://wordpress.org/documentation/article/debugging-in-wordpress/) by changing the following lines on the wp-config.php file.
87+
88+
By default, the wp-config.php generated by Docker will look something like this:
89+
90+
```
91+
define( 'WP_DEBUG', !!getenv_docker('WORDPRESS_DEBUG', '') );
92+
93+
```
94+
95+
Replace it with the following:
96+
97+
```
98+
define( 'WP_DEBUG', true);
99+
100+
define( 'WP_DEBUG_LOG' , true );
101+
102+
define ( 'WP_DEBUG_DISPLAY', true );
103+
104+
```
105+
106+
More info about **debugging in WordPress** you can find [here](https://wordpress.org/documentation/article/debugging-in-wordpress/).
107+
108+
## Xdebug for VSCode
109+
110+
Xdebug is enabled and configured to work on VSCode using the extension PHP Debug.
111+
112+
### Remote Host Debugging
113+
114+
```
115+
"pathMappings": {
116+
"/var/www/html": "${workspaceFolder}",
117+
}
118+
```
119+
120+
# Contributing and Support
121+
122+
It's **work in progress.** Feel free to contribute informing about [issues](https://github.com/sarahcssiqueira/docker-wordpress/issues) or even through [pull requests](https://github.com/sarahcssiqueira/docker-wordpress/pulls) for improvements.

0 commit comments

Comments
 (0)