Database Inspection

Some test scenarios require checking or editing database rows directly. If you need a browser-based database tool for a local WordPress development environment, you can add phpMyAdmin to your wordpress-develop Docker setup.

Using phpMyAdmin

Create or update docker-compose.override.yml in the root of your local WordPress Develop checkout. If you already use an override file for another local service, such as Mailpit, add phpmyadmin under the same services blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience..

services:
  phpmyadmin:
    image: phpmyadmin:latest
    restart: unless-stopped
    depends_on:
      - mysql
    ports:
      - '8080:80'
    environment:
      PMA_HOST: mysql
      PMA_USER: root
      PMA_PASSWORD: password
    networks:
      - wpdevnet

Start the service with:

docker compose up -d phpmyadmin

Then open http://localhost:8080` in your browser. This uses the default local database credentials from the WordPress development environment. The default database name iswordpress_develop`.

When you are finished, stop the service with:

docker compose stop phpmyadmin

When to Use Database Inspection

Use database inspection when a test case asks you to confirm stored values, check records created by a feature, or make a targeted database change as part of a reproduction. For most testing tasks, the WordPress admin screens, WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/, and automated tests should be enough.

s
search
c
compose new post
r
reply
e
edit
t
go to top
j
go to the next post or comment
k
go to the previous post or comment
o
toggle comment visibility
esc
cancel edit post or comment