A powerful, user-friendly desktop application to generate and publish blog posts to your WordPress site using advanced AI models (Google Gemini, OpenAI ChatGPT, xAI Grok).
- Multi-Model AI Support: Choose between Google Gemini, OpenAI's ChatGPT, and xAI's Grok.
- Dynamic Model Listing: Automatically fetches available models from your API provider.
- Direct WordPress Integration:
- Publish as Draft or Public.
- Assign Categories and Tags fetched directly from your site.
- Automatically uploads and sets Featured Images from a URL.
- Content Optimization:
- Generates SEO-friendly titles and structure.
- Automatically creates a meta description (Excerpt).
- Produces clean, semantic HTML content.
- Secure Storage: API keys and WordPress credentials are encrypted and stored locally using standard cryptography.
- Modern UI: A clean, dark-mode interface built with HTML/CSS/JS and a Python Flask backend.
-
Clone the repository:
git clone https://github.com/bugraskl/wordpress-post-generator.git cd wordpress-post-generator -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
-
Open in Browser: The application will automatically start. Navigate to
http://127.0.0.1:5000in your web browser.
- Go to the Settings tab.
- WordPress Configuration:
- Site URL: Your WordPress site URL (e.g.,
https://example.com). - Username: Your WordPress username.
- Application Password: Generate this in your WordPress User Profile > Application Passwords.
- Site URL: Your WordPress site URL (e.g.,
- AI API Keys:
- Enter keys for the services you wish to use (Gemini, OpenAI, xAI).
- Click Save Settings.
- Go to the Create Post tab.
- Write a Prompt: Describe the blog post you want to create (e.g., "A complete guide to learning Python for beginners").
- Cover Image (Optional): Paste a URL for an image. The tool will download it, upload it to your WordPress Media Library, and set it as the featured image.
- Select Provider: Choose Gemini, ChatGPT, or Grok.
- Select Model: Pick a specific model from the dropdown.
- Select Taxonomies: Choose relevant Categories and Tags.
- Click Generate Content.
- Preview & Edit: Review the generated content, title, and excerpt in the pop-up modal.
- Click Publish to WordPress.
- Credentials are stored in
settings.jsonand are encrypted using a locally generatedsecret.key. - Never share your
secret.keyorsettings.jsonfile. - These files are added to
.gitignoreto prevent accidental commits.
This project is open-sourced under the MIT License. See the LICENSE file for details.