GPT 3: How to use artificial intelligence to write blog posts in WordPress?

Table of Contents

Artificial intelligence is changing the world of content and there are many people who want to jump on the bandwagon of AI-generated content, but the complexity of the process of creating content with artificial intelligence or lack of knowledge can be an obstacle to this. 

That is why, from iSocialWeb, we want to help you with a small script that we have programmed to simplify the process. And don’t worry, we will explain everything step by step in a video, and you don’t need to know how to program 😉.

Automating artificial intelligence with Python

We have created a simple script written in Python, which with a few configuration data will do the whole process automatically.

Script functions:

  • Create title
  • Create content
  • Publish content and title on WordPress

Steps prior to the execution of the script:

We will need to upload a list of keywords in .CSV format to the Google Colab environment. With this information, the AI will generate the title and content automatically.

articulos inteligencia artificial

From our script, we have programmed the connection with WP to simplify the process. So we need to have the username and password of the WordPress blog where we want to host the contents, although it is not necessary to be an administrator.

Running Python code in the browser with Google Colab

Colab, also known as Colaboratory, allows us to share content programmed in Python and run the code easily whether you are a student, data scientist or AI researcher:
  1. Save a file copy of Google Colab from the File menu in your Drive.
  2. Install dependencies that Google Colab needs to run the program in your browser by running first cell ▶️. 
  3. Upload a file named articlos.csv with the template provided in this article to the folder located in the side menu. If you change the name, don’t forget to reference the new name in the Google Colab file. 
  4. If it has been executed successfully, a green checkbox will be displayed. Do not proceed to the next step, until that check is displayed. 
  5. Add OpenAI API key. If you don’t already have one, you can create an OpenAI API for free.
  6. Next, add your WordPress credentials so that it can insert content into your blog posts and publish them automatically. 
  7. Add your WordPress user again and in the password, enter the password that is generated in your WP user, when you click on “Application passwords”.
  8. Run the following ▶️. 
  9. If you were able to complete the various code instructions, a new post will be published in your WordPress generated by AI. 
To help you understand the script better, here you can watch a video with a demo of the process:

Where can I find the script to publish content by AI on WordPress?

The script runs on Google Colab which is free and allows you to have a machine ready with everything you need, so you don’t have to install anything on your computer.

🔧 Login here to Google Colab

What problems can I encounter when I run it?

Some of the problems that you may encounter when executing the script can be solved simply by watching the video carefully and following the process step by step, but there are external problems that may occur:

  • CSV encoding: In some cases, the generation of the CSV file is done with a different encoding, or it drags contents that mess up the document and prevents it from being read correctly. For this, you can use this demo file to test the tool. 

🔧 Demo CSV Template IA-WP Articles

  • Access problems: It is important that you check your WP accesses, especially the second password, which is the one that people usually have the most problems with. In addition to this, check with your hosting provider or WordPress configuration that you have not blocked access via API Rest. Here you should consult your hosting provider.
  • OpenAI’s availability problems: OpenAI sometimes overloads and does not return data, especially during US hours. This can cause the program to fail because it does not receive data in the request to the GPT AI.

Will Google penalize AI content?

Google has created different AI-based tools to process natural language, such as Google Translate and Google Assistant, with the aim of facilitating communication and access to information. But… What do you think about generating content automatically? The best thing to do is to go to the source and he reaffirms: if the content is useful and created for people first, that’s not a problem.

Our opinion is that if it really responds to search intent to a greater extent than the content currently displayed, it will certainly rank more relevant. 

What does it mean to respond to search intent?

  1. Have a trained language model to understand the user’s questions or queries.
  2. Have a database or information source to provide a relevant answer.
  3. Have an intent classification system.
  4. Have a search system to find relevant information.
  5. Make sure to provide a clear, accurate and useful answer.
  6.  

What does chat GPT have to say about automated web copywriting?

Once we have everything ready, we wanted to ask ChatGPT 3 about the advantages and disadvantages of using an automated script in Google Colab to insert content on WordPress and this is what he answered us: 

Advantages Disadvantages
Saving time and effort in content creation Dependence on the quality of the script's programming
Increased consistency and regularity in the publication of content Limitations on personalization and customization of content
Possibility to automate repetitive and non-value-added tasks Risk of creating content that may be considered as spam
Increased efficiency in website management Maintenance of the script may require technical expertise

If you are looking to improve your SEO and don't have time to manage your own content, we can help!

We specialise in using AI to create high quality targeted content that helps you improve your online visibility.
Improve your positioning with our advanced AI

If you liked it, please share it:

Related Posts