Wordpress Setup
Connect to a WordPress site via WP-CLI over SSH or the REST API.
Install
npx skills add jezweb/claude-skills --skill wordpress-setup -g -a claude-code -y- Repository
- jezweb/claude-skills1.1k
- Category
- Testing
- Updated
- 26d ago
- License
- MIT
- Context cost
- Lightabout 986 tokens
- Runs scripts
- No, instructions only
What it does
Connect to a WordPress site via WP-CLI over SSH or the REST API. Check CLI, test SSH, set up auth, verify access, save config. Use whenever the user wants to connect to a WordPress site, set up WP-CLI access, create an Application Password, or troubleshoot WordPress connection / auth issues.
WordPress Setup
Connect to a WordPress site and verify working access via WP-CLI or REST API. Produces a verified connection config ready for content management and Elementor editing.
Workflow
Step 1: Check WP-CLI
wp --version
If not installed, guide the user:
# macOS/Linux
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
Also ensure the SSH extension is available (needed for remote sites):
wp package install wp-cli/ssh-command
Step 2: Connect to the Site
Option A: WP-CLI over SSH (preferred)
wp --ssh=user@hostname/path/to/wordpress option get siteurl
Common patterns:
- Rocket.net:
wp --ssh=user@hostname/www/sitename/public option get siteurl - cPanel:
wp --ssh=user@hostname/public_html option get siteurl - Custom: Ask user for SSH user, host, and WordPress path
Test with a simple command first:
wp --ssh=user@host/path core version
Option B: REST API with Application Password
If SSH isn't available:
- Navigate to
https://example.com/wp-admin/profile.php(or use browser automation) - Scroll to "Application Passwords" section
- Enter a name (e.g. "Claude Code") and click "Add New Application Password"
- Copy the generated password (spaces are part of it but optional in auth)
Test the connection:
curl -s https://example.com/wp-json/wp/v2/posts?per_page=1 \
-u "username:xxxx xxxx xxxx xxxx xxxx xxxx" | jq '.[0].title'
Step 3: Store Credentials
For WP-CLI SSH, create a wp-cli.yml in the project root:
ssh:
sitename:
cmd: ssh -o StrictHostKeyChecking=no %pseudotty% user@hostname %cmd%
url: /path/to/wordpress
Then use: wp @sitename option get siteurl
For REST API, store in .dev.vars:
WP_SITE_URL=https://example.com
WP_USERNAME=admin
WP_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx


