AdvancedLesson 20 of 28 · 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

Check database recovery before editing

Use a disposable InnoDB table with a primary key. Inspect columns and exact row selectors; keep writes within the 500-row cap. Inspect undoable, not_undoable and change_id, read back and test History undo. No primary key, non-InnoDB or a primary-key update is non-undoable. Old 3.17–3.19 records remain non-undoable.

Use a disposable test table and identify the exact rows first. Version three point twenty supports row-based undo when the table supports it. After saving, check whether the answer says the change can be undone. A table without a primary key, an unsupported table type, or changing that key can leave you without undo. Keep a backup and test recovery.

Step 05

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.

Step 06

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 07

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.

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.

Your EMCP guide

Answers from our docs

YOUR CHAT, YOUR CHOICE

Before we chat

MSR Builds processes your question and up to four recent messages on our server to answer from the EMCP docs. AI is optional and needs your separate permission.

The chat is kept in this page's memory, not saved as a conversation in our database or browser storage. Our hosting and security services process connection information, such as your IP address, to prevent abuse.

Cloudflare Turnstile checks your browser and connection to prevent automated abuse when you send a question. No login is required.

Please leave out personal, sensitive or confidential information, passwords and API keys.

You can withdraw consent and clear this page's chat at any time. This cannot undo a request already sent or erase provider/security records.

Chat privacy, retention & your rights ↗ · Privacy contact

Starting chat consents to this processing. You can browse our docs without using the chat.