Blog post creator is a script built using Codeigniter4 PHP framework to help in the creation of blog posts. AI content creation platforms are extremely popular but can also be expensive.
This script should get you up and running with a self hosted platform that utilises SerpAPI and OpenAI to generate blog posts.
SerpAPI is used to fetch and analyse Google search results and estimate blog post word count and also top performing results outlines. You get 100 searches a month free, or you can upgrade to a paid subscription for more searches.
OpenAI is used to generate content using their AI content generation tool. This costs per query but is very cheap. You'll find you might only spend less than $10 a month and generate 1000s of words. Much cheaper than commercial platforms.
RapidAPI to analyse the top ranked blog posts and extract the top keyword phrases that you need to use in your blog post content. This is the RapidAPI that you need to connect with https://rapidapi.com/tim-_W7DOt_W2/api/extract-keywords1/ and update the API key in the .env
file.
There is also a content editor built into this script so you can draft your blog posts. It auto saves what you've written to your browser storage so you can come back to the draft at a later date. You'll need to sign up to tiny.cloud for an API key.
First you need to sign up for the API services this script uses: SerpAPI, OpenAI and TinyMCE.
Clone the project git clone https://github.com/domaingenerator/blog-post-creator.git
or simply download the Zip file from Github.
All packages have been installed via composer so run composer install
.
-
Rename the
.env_example
file to.env
and open it up in your favourite editor and scroll to the end of the file. Update the variables with your API keys. -
Next open file
app > config > App.php
and update thepublic $baseURL
variable to reflect either the domain you will host the script orlocalhost:port-number
. If you are runningphp spark serve
locally the port is usuallyhttp://localhost:8080
-
Create a database and import the blog-post-assist.sql
If you are self hosting this with a domain, make sure you set the document root to the public
folder of this script.
To run the project locally, simply run php spark serve
or php -S localhost:3000 -t ./public
.
PHP version 7.4 or higher is required, with the following extensions installed:
Additionally, make sure that the following extensions are enabled in your PHP:
- json (enabled by default - don't turn it off)
- mbstring
- mysqlnd
- xml (enabled by default - don't turn it off)
A2hosting shared hosting runs this project perfectly.
- Save search results to the SQLite database
- Ability to create a post outline from headings in results
- Save/load multiple blog post drafts to SQLite
- Function to send draft directly to Wordpress via email
- Make the design more mobile friendly
- Use a JS framework like ReactJS or Vuejs for frontend
Open an issue on the Github or email me at [email protected].
Feel free to submit PRs or Fork the project to do something else.
I'd really appreciate a link on your website/blog back to my other generator site domaingenerator.app