Integração WordPress

Finding Your WordPress REST API URL

64 visualizações

What is the WordPress REST API?

The WordPress REST API is a feature that allows external applications to communicate with your WordPress site. BlogFlux uses it to publish content directly to your blog.

What URL Do I Need for BlogFlux?

BlogFlux needs your WordPress base URL only - we automatically add /wp-json when connecting:

https://yourdomain.com

Common URL Patterns

Standard WordPress Installation

https://blog.example.com

WordPress in Subdirectory

If WordPress is installed in a subdirectory:

https://example.com/blog

Custom Domain with Subdomain

https://blog.yourcompany.com

How to Find Your WordPress URL

Method 1: Check WordPress Settings

  1. Go to your WordPress admin at yourdomain.com/wp-admin
  2. Navigate to Settings → General
  3. Look at the "WordPress Address (URL)" field
  4. Use that URL in BlogFlux (don't add /wp-json - we do this automatically)

Method 2: Test in Your Browser

  1. Open a new browser tab
  2. Type: https://yourdomain.com/wp-json
  3. Press Enter
  4. You should see a JSON response (text with curly braces and data)

✓ REST API is Working

If you see JSON data (something like {"name":"My Blog","description":"Just another WordPress site"...}), your REST API is working correctly!

✗ REST API Not Working

If you see a 404 error or "Page not found", your REST API may be disabled or your URL is incorrect.

Verifying REST API Works

What You Should See

A working REST API returns JSON data that looks like this:

{
  "name": "My Blog",
  "description": "Just another WordPress site",
  "url": "https://yourdomain.com",
  "home": "https://yourdomain.com",
  "namespaces": [
    "oembed/1.0",
    "wp/v2",
    "wp-site-health/v1"
  ]
}

Testing with curl

You can test your REST API from the command line:

curl https://yourdomain.com/wp-json

Common Issues

404 Error - Page Not Found

Possible causes:

  • Wrong URL format (use base URL without /wp-json - BlogFlux adds it automatically)
  • WordPress installed in subdirectory (use https://domain.com/subdirectory)
  • Permalink settings issue
  • REST API disabled by plugin

REST API Disabled

Some security plugins or hosting providers disable the REST API. Check:

  • iThemes Security: Go to Settings → REST API and ensure it's enabled
  • WordFence: Check if REST API is being blocked in firewall rules
  • Hosting Settings: Some hosts disable REST API by default - contact support

Permalinks Not Set Correctly

  1. Go to Settings → Permalinks in WordPress admin
  2. Click Save Changes (even if you don't change anything)
  3. This refreshes the permalink structure and often fixes REST API issues

Advanced: Custom REST API Endpoints

Some WordPress setups use custom REST API locations. If standard patterns don't work:

  • Check with your WordPress developer
  • Look for custom rewrite rules in .htaccess
  • Contact your hosting provider

Need More Help?

Este artigo foi útil?

Artigos Relacionados

Ainda precisa de ajuda?

Não encontrou o que procura? Nossa equipe de suporte está aqui para ajudar.

Contatar Suporte

Preferências de Cookies

Usamos cookies para melhorar sua experiência de navegação, analisar o tráfego do site e personalizar o conteúdo. Ao clicar em "Aceitar Todos", você concorda com o nosso uso de cookies. Saiba mais