Make.com でWordpressのJSON URLが必要なので、それはどこなのかを知らねばならないのでChatGPTにきいてみた
To find your WordPress site’s API URL, you need to know whether your site is hosted on WordPress.com or is a self-hosted WordPress site. Here’s how to find the API URL for both scenarios:
1. WordPress.com Site ← 今回はこっちね
If your site is hosted on WordPress.com:
- The API URL is typically in the format:bashコードをコピーする
https://public-api.wordpress.com/wp/v2/sites/your-site.wordpress.com - Replace
your-site.wordpress.comwith your actual WordPress.com site URL.
今回は https://hogehoge.com//wp-json/ だった
Steps to Confirm:
- Log in to your WordPress.com account.
- Go to your site’s dashboard.
- Use the above format to confirm the URL works. For example:
- Visit
https://public-api.wordpress.com/wp/v2/sites/your-site.wordpress.com/postsin your browser to view a JSON feed of your posts.
- Visit
2. Self-Hosted WordPress Site
If you’re using a self-hosted WordPress site (installed on your own server or through a hosting provider like Bluehost, SiteGround, etc.):
- The API URL is typically in the format:arduinoコードをコピーする
https://your-domain.com/wp-json/wp/v2 - Replace
your-domain.comwith your actual site URL.
Steps to Confirm:
- Ensure the WordPress REST API is enabled (it is enabled by default on WordPress 4.7+).
- Visit:arduinoコードをコピーする
https://your-domain.com/wp-jsonThis should display the REST API root.
Example Endpoints:
- Posts:
https://your-domain.com/wp-json/wp/v2/posts - Pages:
https://your-domain.com/wp-json/wp/v2/pages
3. How to Verify API Functionality
- Open a browser or API tool (e.g., Postman).
- Enter the URL (e.g.,
https://your-domain.com/wp-jsonor the WordPress.com API URL). - You should see JSON data that confirms the REST API is working.
Troubleshooting:
- Error 404: Ensure your site uses pretty permalinks (
Settings > Permalinks > Set to anything but "Plain"). - Blocked API: Some hosting providers may block the REST API. Check your hosting settings or contact support.
- WordPress.com Plan Limitation: Free WordPress.com plans may have restricted API access for third-party tools.