AdvancedLesson 20 of 22 · 7 steps

Inspect files, the database, and WP-CLI jobs

Use advanced administration tools on a test site with a bounded task.

Video coming soon

Your next step is ready.

Follow the complete written guide below.
The video will join it here when it’s ready.

Start the written lesson

Before you start

  • A practice site and permission for the task.
  • Administrator/developer experience.
  • A current backup and only the required tool switches enabled.

Let’s do this, step by step.

Step 01

Start with inspection

List relevant directories or database tables and inspect a small, non-sensitive target.

These are advanced site tools. Use the ordinary content or plugin integration when it already handles the task.

Step 02

Read a bounded result

Read a non-secret file or a limited database query. Respect protected paths and tables.

Do not work around a protected-read refusal. Queries have row and time limits, and user credentials belong outside a tutorial recording.

Step 03

Make a test file change

On a disposable test file, review one edit, use the file tool, and inspect the backup and saved result.

File writes can affect running code. Stay inside the intended test file and keep the prior copy available.

Step 04

Use structured database edits only when needed

For a test table, inspect columns and review the exact row selector before a structured update.

Database updates need a specific non-empty target. A recorded change does not guarantee automatic rollback, so keep a real backup.

Step 05

Run a read-only WP-CLI command

Enable run-wp-cli for the task and use plugin list --format=json. Inspect its output and exit code.

Enter the command without the leading wp. Running a command is different from using WP-CLI as the connection transport.

Step 06

Track long jobs by ID

For a deliberately chosen long task, use dispatch-wp-cli, record its job ID, and inspect get-wp-cli-job until completion.

Starting a job is not the same as finishing it. Check the final exit code and result before moving on.

Step 07

Configure server-side WP-CLI when needed

For execution tools over HTTP, set Connection → 3rd-party services → WP-CLI command, then Save changes. An empty field supports in-process execution only. Enable needed actions on Tools → WordPress → WP-CLI and Save changes.

For remote command execution, set the command your server can run. Save it, enable only the required action, and test a read-only command. This setting is separate from connecting a local AI app through WP-CLI.

You’re done when…

The advanced task has a specific target, a verified result, and a known recovery route.

Keep the reference handy.

The docs cover tool details and requirements for this lesson.