Connecting WordPress
Connect your WordPress site to browse and import content.
Connecting WordPress
PhantomWP can connect to your WordPress site to import content and use it as a headless CMS. This lets you continue using WordPress for content management while serving a fast Astro site to your visitors.

Prerequisites
Your WordPress site needs:
- WordPress REST API enabled (default in WordPress 4.7+)
- Public access to the REST API (or proper authentication)
- Posts or pages with "Published" status
How to Connect
- Open your project in the PhantomWP IDE
- Click the WordPress icon in the header
- Enter your WordPress site URL (e.g.,
https://yoursite.com) - Click Connect

PhantomWP will test the connection and show what content is available.
What Gets Connected
When you connect WordPress, PhantomWP can access:
Posts
- All published blog posts
- Post content (HTML)
- Featured images
- Categories and tags
- Author information
- Publication dates
- Custom fields (if exposed via REST API)
Pages
- All published pages
- Page content
- Featured images
- Parent/child relationships
Media
- Images uploaded to the media library
- File URLs and metadata
- Alt text and captions
Taxonomies
- Categories
- Tags
- Custom taxonomies (if registered for REST API)
Connection Options
Site URL
The base URL of your WordPress site. Include https:// but not trailing slashes.
Examples:
- ✓
https://mysite.com - ✓
https://blog.mysite.com - ✗
https://mysite.com/ - ✗
mysite.com
Authentication (Optional)
For private content or protected REST APIs, add authentication:
Application Password
- In WordPress, go to Users → Profile
- Scroll to Application Passwords
- Enter a name and click Add New Application Password
- Copy the generated password
- Enter it in PhantomWP's WordPress settings

JWT Token
If your site uses JWT authentication:
- Get a JWT token from your authentication endpoint
- Enter it in the token field in PhantomWP
Verifying the Connection
After connecting, PhantomWP shows a summary:
- ✓ Connection successful — API is accessible
- Posts found: X — Number of published posts
- Pages found: X — Number of published pages
- Media items: X — Number of media files

Troubleshooting
"Connection Failed"
Check that:
- Your WordPress site is accessible
- The URL is correct (no typos)
- Your site doesn't block the REST API
- You're using HTTPS if required
"REST API Not Available"
Some security plugins disable the REST API. Check:
- Is the REST API intentionally disabled?
- Is there a security plugin blocking it?
- Does your hosting provider block API access?
Test manually by visiting: https://yoursite.com/wp-json/wp/v2/posts
"No Posts Found"
Make sure you have:
- At least one published post (not draft)
- Posts that aren't password-protected
- Posts visible to the REST API
Authentication Issues
If using Application Passwords:
- Make sure Application Passwords are enabled
- The password is entered correctly (no spaces)
- Your user has permission to read posts
Security Considerations
When connected:
- PhantomWP only reads data from WordPress
- Your WordPress login credentials are stored securely
- Connection happens from your browser to WordPress
For maximum security, see our WordPress Security guide on hiding your WordPress site from the public while keeping it accessible to PhantomWP.
Disconnecting
To disconnect your WordPress site:
- Click the WordPress icon
- Click Disconnect
- Confirm the action
This removes the connection but doesn't affect already-imported content.
Next Steps
- Browsing Data — Explore and insert WordPress content
- Importing Content — Import posts and pages
- Security — Secure your WordPress installation