Skip to content

01 Getting Started

Peter Wise edited this page Oct 26, 2023 · 1 revision

Basic outline of how to get started on a new theme or plugin project:

  • Get a staging site setup on the server, and a local copy setup on your local machine
  • If an appropriate "starter" repo exists, use one of the templates to generate a new repo for your project. If no good template exists for your project, you can start from scratch and use squarecandy-common to load in shared resources that should be the same across projects.
  • Install the theme or plugin on your WordPress site: Use git-updater to manage it on the staging site, and use git to manage the repository on your local machine.
  • Make sure the following requirements are installed globally on your local machine: npm, composer, WP CLI, in addition to a standard LAMP/LEMP stack. You will also probably want to install nvm to easily switch versions of node to accommodate legacy projects and facilitate upgrading them. A method to switch PHP versions easily will also be essential going forward.
  • Run npm install && composer install && grunt init in the theme or plugin directory
  • Run grunt while you work to listen for changes to your scss and js files and compile them immediately as you work

Clone this wiki locally