LLM Prompts

Streamline WordPress Management with WP-CLI Prompts for Small Businesses

Automate WordPress tasks with optimized WP-CLI prompts.

The method

Use these prompts directly in ChatGPT/Gemini/Claude. Adapt them to your specific WP-CLI tasks, such as plugin management, user administration, or content updates. Perfect for automating routine WordPress tasks. Remember to adjust commands.

The prompts

Prompt 1
Craft a WP-CLI command sequence to update all plugins on my WordPress site to their latest versions. Ensure the command includes error handling to prevent site downtime in case of incompatibility issues. Also, add a step to create a database backup before initiating the update process. The goal is to safely and efficiently update all plugins on 'example.com' through secure SSH connection and verify the site functionality post-update. Explain the purpose of each part of the script, and also the way to run the script.
Prompt 2
I need a WP-CLI command to create a new user with the username 'new_editor', email '[email protected]', and the role of 'editor'. Include a strong, randomly generated password for the user and output the password securely to the terminal. Provide detailed instructions on how to use the command safely without exposing the password in scripts. The task is to programmatically create a new editor account on 'example.com' with security best practices in mind. Please note that the database name is 'wp_main'
Prompt 3
Generate a WP-CLI command that exports the entire WordPress database ('wp_main') to a file named 'backup.sql.gz', compressed using gzip, and stores it in a secure directory '/var/backups/'. The command must include error handling to ensure successful backup creation. Also, give a full example of how to restore this database if any issue happens. The goal is to create a reliable backup solution for my WordPress database on the server, enabling quick restoration if data loss occurs on my website 'example.com'.