Tag : page creator

[Python 2.X] WordPress Page Creator

Description:

This python script logs into your wordpress, goes to the “Pages” section and creates your starting/foundation pages.

Requirements:

  • Python 2.7
  • BeautifulSoup
  • Mechanize

Setting up the text file:

  1. Create a text file named: “PagesToCreate.txt”
  2. Put “PagesToCreate.txt” in the same folder as the python script.
  3. Each line in the text file represents a new page. The text from each line is then used for the page title and content.

Useful for?

This quick script was designed for me to use when I have a new client that wants a wordpress site. I tend to have a lot of similar pages such as: Contact, About, Meet the Team, FAQ, etc… So to have a script create all my pages when I am creating a brand new wordpress site really helps.

The Python Code: