Skip to content

vigetlabs/wordpress-site-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Site Starter

This is a WordPress starter project that includes a basic custom theme, including some essential custom components, and a project setup designed for fast local setup and development.

Requirements

Using this Project

To begin using this on a new project, simply call the following command from the root of your project:

$ composer create-project vigetlabs/wordpress-site-starter

Follow the prompts to set up your project with the desired information. You will be asked:

  1. The name of the project (My Project): This will serve as the name of the WordPress Theme.
  2. The project slug (my-project): This will be used as the directory name for the theme as well as the local DDEV site name.
  3. The text domain (my-project): This will be used for internationalization and localization and defaults to the project slug.
  4. The project Package name (MyProject): This is referenced in the PhpDoc blocks and default project namespace. It defaults to the project name.
  5. The function prefix (my_project_): This is used to prefix all custom theme functions and defaults to the project slug.

Automated Setup

Following the series of prompts, the project will be set up with the following:

  1. Composer Dependencies: All necessary dependencies for WordPress and the theme.
  2. WordPress Core: The latest version of WordPress will be downloaded.
  3. Local Development Environment: A DDEV configuration file will be created and the local environment will be started.
  4. Theme Setup: The theme will be set up with the project name and slug.
  5. ACF Pro: If an auth.json file is present in the project root, ACF Pro will be installed.
  6. package.json Dependencies: All necessary script and style build dependencies for the theme will be installed and initialized.
  7. Cleanup: Any setup files will be removed and the project will be ready for development.

After the setup is complete, it is recommended to perform your initial commit and push to your project repository.

Development

The following command will create a directory (project-name) and run composer create-project using your local repository as the source. Be sure to replace the path with the correct path to your local repository.

Also, in packages.json, you can change the name of the branch from main to use your current working branch.

Note: Be sure to update the paths in packages.json as well as the command below to point to the location of your local repository. ~/ will not work, you must use the full path.

$ mkdir project-name && cd project-name && composer create-project --repository-url="/root/path/not/relative/path/to/wordpress-site-starter/packages.json" vigetlabs/wordpress-site-starter . --stability=dev --remove-vcs --no-install

Changelog

0.1.2

  • Better Composer Script Handling
  • Improvements to post-create project setup
  • Cleaner Initialization of Vite

0.1.1

  • Composer Script Updates
  • Vite/Tailwind/DDEV Updates

0.1.0

  • Initial Release