{"id":16796983,"url":"https://github.com/johnrom/docker-wordpress-wp-cli-xdebug-soap","last_synced_at":"2026-01-04T01:03:25.276Z","repository":{"id":148550986,"uuid":"78033514","full_name":"johnrom/docker-wordpress-wp-cli-xdebug-soap","owner":"johnrom","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-15T14:51:11.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T00:01:29.179Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnrom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-04T16:38:06.000Z","updated_at":"2017-01-04T16:39:43.000Z","dependencies_parsed_at":"2023-05-20T12:00:19.816Z","dependency_job_id":null,"html_url":"https://github.com/johnrom/docker-wordpress-wp-cli-xdebug-soap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fdocker-wordpress-wp-cli-xdebug-soap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fdocker-wordpress-wp-cli-xdebug-soap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fdocker-wordpress-wp-cli-xdebug-soap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fdocker-wordpress-wp-cli-xdebug-soap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnrom","download_url":"https://codeload.github.com/johnrom/docker-wordpress-wp-cli-xdebug-soap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971156,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T09:20:45.660Z","updated_at":"2026-01-04T01:03:25.231Z","avatar_url":"https://github.com/johnrom.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-wordpress-wp-cli-xdebug\n\nThis is an image based off of [Conetix's docker-wordpress-wp-cli](https://github.com/conetix/docker-wordpress-wp-cli).\n\nThis repository adds xDebug support.\n\nAdditionally, I've removed an opcache configuration file that the WordPress image installs because it appeared to affect PHP Opcode Caching on my machine. You shouldn't notice a difference unless your local machine gets a lot of hits *lol*.\n\n**This is super untested.** Do not use in production. I built this on Windows so permissions are not correct. Maybe one day I will fix it.\n\nTo use, you'll have to pass a variable to XDebug with your IP Address. Please note, this is the IP address of your machine, not the docker VM. It is generally a 192.168.* address. You can find it a number of ways, one is to check the Virtual Host-Only Network in VirtualBox and look at the gateway IP. Another way is to get the IP address of eth1 on the Virtual Machine, and replace the last octal with \"1\".\n\n`192.168.99.100 =\u003e 192.168.99.1`\n\nAre you super lazy? Try the following within Docker Terminal, replacing default with your machine name if necessary:\n\n`echo $(docker-machine ip default) | sed 's/\\.[0-9]*$/.1/'`\n\nExample: `192.168.99.1`\n\nAre you the only one developing your project? Try:\n\n```\nwp_site:\n  image: johnrom/docker-wordpress-wp-cli-xdebug\n  ... [ your regular configuration ]\n  environment:\n    XDEBUG_CONFIG: remote_host=[your.local.ip4.address]\n```\n\nIf that worked, skip to \"So what now?\"\n\n---\n\nAre you **not** the only one developing your project? Then we'll have to use the environment variable from each of your shells. So, replace the above with:\n\n```\nwp_site:\n  image: johnrom/docker-wordpress-wp-cli-xdebug\n  ... [ your regular configuration ]\n  environment:\n    - XDEBUG_CONFIG\n```\n\nThis means it will use whatever environment variable is in your shell when you run `docker-compose up -d`. Now go download the xdebug.sh file from this GitHub repo to your root docker directory. If your docker-machine is not named default, you should replace default with your machine's name in the `xdebug.sh` file.\n\nEvery time, before you run `docker-compose up -d`, run `eval $(./xdebug.sh)` **in the directory with `docker-compose.yml` in it**. Like so:\n\n```\neval $(./xdebug.sh)\ndocker-compose up -d\n```\n\nThis tiny command runs the `docker-machine ip | sed` command above and exports it to an environment variable, that docker-compose picks up.\n\nTo confirm everything is working, make a phpinfo.php with `\u003c?php phpinfo(); ?\u003e` and check the variables for XDebug -- \"remote_host\" should show your IP address.\n\n## So what now?\n\nNow, PHP will query your host machine on port 9000 every time you make a request. You'll have to set up an xdebug debugger in your editor of choice. I'm currently using VS Code so I haven't verified any others' tutorials. Set breakpoints, test listening for notices, etc. It should all magically work.\n\n- [VS Code](https://github.com/felixfbecker/vscode-php-debug) - skip *Install XDebug*, go to Configuration, and make sure to set localSourceRoot and serverSourceRoot\n- [Sublime](https://github.com/martomo/SublimeTextXdebug) - **unverified**\n- [Atom](https://atom.io/packages/php-debug) - **unverified, but official**\n- [Brackets](https://github.com/spocke/php-debugger) - **unverified**, don't use \"idekey\"\n\n### If that wasn't enough\n\nHere's my launch.json for every project in VS Code for demonstrative purposes:\n\n```\n{\n\t\"version\": \"0.2.0\",\n\t\"configurations\": [\n\t\t{\n\t\t\t\"name\": \"Listen for XDebug\",\n\t\t\t\"type\": \"php\",\n\t\t\t\"request\": \"launch\",\n\t\t\t\"port\": 9000,\n            \"localSourceRoot\": \"${workspaceRoot}\",\n            \"serverSourceRoot\": \"/var/www/html\"\n\t\t}\n\t]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnrom%2Fdocker-wordpress-wp-cli-xdebug-soap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnrom%2Fdocker-wordpress-wp-cli-xdebug-soap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnrom%2Fdocker-wordpress-wp-cli-xdebug-soap/lists"}