Posts

Showing posts with the label Xdebug

Setup Wordpress debug environment with Docker and Xdebug

Image
  It's a common practice to debug PHP script using Xdebug. Xdebug is an extension for   PHP   to assist with debugging and development.  In this article, I'm going to introduce a more convenient way to fast setup development environment with PHPStorm, Docker, Docker compose and Xdebug.  The source code for docker compose configs are available in the Github:  https://github.com/liqili/wordpress-xdebug-docker/   First of all, suppose we have installed Docker and Docker compose in a Linux-like OS, and installed a Wordpress site in production. Then what we need to do is to setup a development environment for that site so that we can customize plugins or what else. This post will help you learn how to: Use Docker compose to mange docker containers. Export production db to dev Mysql docker container. Integrate Xdebug plugin with docker container as well as PHPStorm. How to initialize MySQL container with sql script file.  docker-compose.yml for containe...