instructions

How to Set Up Your OpenAI API Key for the WordPress Plugin

To use your Auto Post from OpenAI GPT plugin, you need an OpenAI API key. Here’s how to get and configure it:


Step 1: Get an OpenAI API Key

1. Sign Up / Log In to OpenAI

2. Access API Keys

3. Create a New API Key

  • Click “Create new secret key”
  • Give it a name (e.g., “WordPress Auto Post Plugin”)
  • Copy the key (you won’t see it again!)

⚠️ Important:

  • Do not share this key (it’s linked to your billing).
  • If lost, delete it and generate a new one.

Step 2: Add the API Key to WordPress

1. Go to Plugin Settings

  • In WordPress Admin, go to:
    Copy
    Auto Post GPT → Settings

2. Paste the API Key

  • Find the “OpenAI API Key” field.
  • Paste your copied key.

3. Save Changes

  • Click “Save Settings” at the bottom.

Step 3: Set Up Billing (Required!)

OpenAI charges per request (typically ~$0.002 per 1K tokens).

1. Check Usage Limits

  • Go to OpenAI Billing
  • Set up payment method (credit card required).

2. Monitor Costs

  • Free tier does not work with API keys (only ChatGPT web).
  • Set usage limits to avoid surprises:
    • Go to “Usage Limits” → Set hard/soft limits.

Step 4: Test the API Key

1. Manual Post Generation

  • In the plugin settings, try:
    • Prompt: “Write a 300-word blog post about WordPress SEO tips”
    • Click “Generate and Post Now”

2. Check for Errors

  • If you see “Invalid API key”, double-check:
    • No extra spaces in the key.
    • Your OpenAI account has active billing.

Troubleshooting

❌ “You exceeded your current quota”

❌ “Invalid API key”

  • Fix:
    1. Regenerate the key in OpenAI.
    2. Update it in WordPress plugin settings.

❌ API not responding

  • Fix:
    • Check OpenAI Status for outages.
    • Increase “Timeout” in plugin settings (if slow connections).

Bonus: Secure Your API Key

  • Never commit it to public code (use WordPress wp-config.php secrets if needed).
  • Rotate keys periodically (delete old ones in OpenAI).

Next Steps

✅ Your plugin is now ready to auto-generate posts!
➡️ Need DALL-E for images? I can help add AI-generated featured images too.

Let me know if you run into issues! 🚀

 

Step 5: Test the Plugin

  1. Manual Post Generation:
    • Go to the plugin’s settings page.
    • Enter a test prompt (e.g., “Best WordPress SEO tips”).
    • Click Generate and Post Now.
  2. Scheduled Posts:
    • Add keywords in the settings (one per line).
    • The cron job will auto-generate posts based on the schedule.

Troubleshooting

  • “Plugin could not be activated”: Check for PHP errors in wp-content/debug.log.
  • API errors: Verify your OpenAI API key and billing.
  • Cron not working: Install a cron manager plugin like WP Crontrol.
Scroll to Top