$119

WP blog everyday - GPT3.5

0 ratings
I want this!

WP blog everyday - GPT3.5

$119
0 ratings


This script is designed to automate the process of generating and publishing blog posts on a WordPress website. It uses OpenAI's GPT-3.5-turbo model to create content based on a given topic and category, and then posts the generated content to the website using the WordPress REST API. The script also helps in fetching relevant images from Unsplash and sets them as the featured image for each post. This automation can help you achieve your content goals by efficiently generating high-quality, relevant articles for your website without any manual intervention.

Modifying the script with placeholders for credentials:

Replace the credentials in the script with the following placeholders and provide comments on the format of the values:

  1. OpenAI API Key:

openai.api_key = "your_openai_api_key" # Replace with your OpenAI API key

  1. Unsplash Access Key:

access_key = "your_unsplash_access_key" # Replace with your Unsplash Access Key

  1. WordPress Credentials:
  1. Log in to your WordPress admin dashboard: The URL usually looks like https://yourdomain.com/wp-admin. Use your admin account credentials to log in.
  2. Enable the Application Passwords feature: Since WordPress 5.6, Application Passwords are available as a built-in feature. However, it may be disabled by default. To enable it, add the following line to your wp-config.php file:

define('WP_APPLICATION_PASSWORDS', true);

Make sure to add it before the /* That's all, stop editing! Happy publishing. */ line. Save the changes and upload the modified wp-config.php file back to your server if necessary.

  1. Generate an Application Password: Once the feature is enabled, go to Users > Profile (or Your Profile if you're using your own account) in the left sidebar. Scroll down to the "Application Passwords" section. Enter a descriptive name for the new password in the "New Application Password Name" field, such as "Content Generation Script." Click on the "Add New" button to generate the password.
  2. Note down the Application Password: After generating the Application Password, it will be displayed only once. Make sure to copy and save it securely. You will use this password, along with the WordPress username, to authenticate with the WordPress REST API in the content generation script.
  3. Update the script: Replace the placeholders in the script with the actual WordPress username and the Application Password you noted down in the previous steps. Make sure to keep these credentials secure and not share them with anyone who shouldn't have access to your WordPress admin.

wp_username = "your_wp_username" # Replace with your WordPress username, e.g., "aymane" wp_password = "your_wp_password" # Replace with your WordPress password application

Tutorial on using the script on a daily basis on a server:

  1. Set up a virtual environment:

Create a virtual environment to manage the dependencies for the script.

bashCopy code

python3 -m venv venv source venv/bin/activate

  1. Install dependencies:

Install the required packages using pip:

bashCopy code

pip install openai nltk pandas requests markdown

  1. Store the credentials securely:

Store the API keys and other credentials in environment variables or a secure credential storage system to avoid exposing them in the script.

  1. Schedule the script to run daily:

Use a task scheduler like cron on Linux or Task Scheduler on Windows to run the script daily at a specific time. For example, create a cron job on Linux by running crontab -e and adding the following line:

bashCopy code

0 8 * * * /path/to/venv/bin/python /path/to/generate.py

This will run the script every day at 8:00 AM.

  1. Generate the credentials needed:
  • OpenAI API Key: Sign up for an account at https://beta.openai.com/signup/, and then go to the API keys section to get your API key.
  • Unsplash Access Key: Create an account at https://unsplash.com/join, then go to https://unsplash.com/oauth/applications and create a new application. You will receive an access key after creating the application.
  • WordPress Credentials: Use the username and password for the WordPress account that you want to use for publishing the articles.


Generating the list of topics to avoid duplication: (Will be automated in later versions)

Download topics.xls and do the following:

For each category, you have in the authors variable, create a tab, then go to chatGPT and ask:

Generate 100 topics that would generate high SEO traffic related to {category}


Copy the list and put it in the column called Topics (You might need to answer "continue" to have the full list of topics)

Then set the date to be posted for every topic.

I want this!

A script that generates high quality unique content and posts it automatically on wordpress.

Copy product URL