WordPress Barebones starter script and theme

WordPress Barebones starter script and theme

Use this script to get up and running quickly with a new WordPress website

January 2020

After developing custom WordPress websites for years, something that I always find myself wanting to optimise/automate is the initial setup process. I find myself always doing the exact same steps to get up and running.

I've created a script which automates the entire process by running one file. Check the repository for the most up to date installation instructions as I continue to update the script and theme.

WordPress Barebones script output

Here is what the script does:

  • Downloads the latest version of WordPress
  • Extracts the official ZIP file to a public folder and removes the ZIP
  • Removes the Akismet plugin
  • Removes the Hello Dolly plugin
  • Removes all the default WordPress 'twenty' themes
  • Installs a barebones theme which contains only the commonly used files. It also includes a number of useful functions that I add to all projects. Most of the theme files are empty, allowing for a quick starting point
  • Sets up a local Vagrant environment with the Scotchbox Pro box
  • Performs cleanup, including deleting the script itself

Some useful functions include:

  • Defining constants for parent and child themes. These allows much shorter calls in the theme
  • Disables the WordPress admin file-editor for added security
  • Removes the WordPress version from the source code, including all scripts and styles
  • Show a generic login error for added security
  • Disables comments throughout the site, including removing menu items

I will continue to update the script and theme as I find more useful functions to add.

Try it out, and let me know if you find it useful. Pull requests are welcome on the GitHub repo with any improvements.

Sign up for my newsletter

Get notified when I post a new article. Unsubscribe at any time, and I promise not to send any spam :)

© Steven Cotterill 2021