Inspect a WordPress installation and practice careful maintenance.
WP-CLI must be installed. Run from a demo WordPress directory as its appropriate owner, or supply --path. Verify backups before changing data; never copy live credentials.
10 entries · Essentials first · Reviewed October 5, 2026
Glossary: commands, keywords & terms
Select a term for its definition, syntax, example, and common mistakes.
Export WordPress’s configured database to a private absolute path outside the web root.
⚠ Caution: May overwrite the named dump file; the export contains private database data.
Terminal
wp --path=/srv/demo-wordpress db export /srv/demo-backups/wordpress-demo.sql
Practical useMake a private staging backup before a planned change.
Common mistakesThe backup directory must exist and be private. A database dump contains sensitive data; media and files need separate backups. Test restore on staging.
On staging, update one example plugin after a tested backup, then check the site. The example slug must be replaced with an installed plugin.
⚠ Caution: Changes plugin files and may affect availability or database structure.
Terminal
wp --path=/srv/demo-wordpress plugin update example-plugin
wp --path=/srv/demo-wordpress plugin list
Practical useValidate a selected plugin update before live maintenance.
Common mistakesCheck release compatibility and test important flows. Updates can execute plugin code and change database schemas; avoid an unreviewed update --all.
Request deletion of one selected demo post. An untrashed post normally goes to Trash when WordPress Trash is enabled.
⚠ Caution: Removes the selected post. May permanently delete it if already trashed, Trash is disabled, or --force is used.
Terminal
wp --path=/srv/demo-wordpress post get 123 --fields=ID,post_title,post_status
wp --path=/srv/demo-wordpress post delete 123
Practical usePractice cleanup of an explicitly disposable test post.
Common mistakesInspect the target ID and status first. Already-trashed posts, or disabled Trash, can cause permanent deletion even without --force. A backup is required for recovery.