Skip to content

joonassandell/rebirth

Repository files navigation

Rebirth logo

Rebirth

WordPress boilerplate with a set of useful development tools and an improved directory structure. Rebirth used to be "a starting point with HTML, CSS and JavaScript recipes you can copy and paste into your apps" but has since evolved to being just a WordPress boilerplate. Read more from history.

Features

  • Docker container to spin up local development environment with prereconfigured database
  • Dependency management with Composer
  • Theme boilerplate with Vite, Timber and Shipit
  • Configuration with environment specific files
  • Useful plugins out of the box
  • WordPress installation to remote locations
  • Scripts for updating plugins and deploying databases and assets to remote locations
  • Scripts for pulling databases and assets from remote locations

Requirements

Quick start (recommended)

Quickly install with create-project. Learn from the variables below and add your values to the following one-liner:

npx create-project my-project-dir joonassandell/rebirth#main --theme-dir=my-theme-dir --author="Joonas Sandell" --production-url=https://my-project.com --git-ssh="[email protected]:username/repository.git" --acf-key="9wZ..." --acf-pw="https://registeredacfdomain.com"

After the installation is done jump to step 3 in the next section.

Getting started

1. Clone and create project directory

git clone https://github.com/joonassandell/rebirth.git my-project-dir

2. Search & replace the required variables in all files

  • {{name}}: This is your project name (e.g. my-project-dir. Preferrably use the same name as your project directory).
  • {{theme-dir}}: This will be your theme directory and name (e.g. my-theme)
  • {{author}}: Author of this project (e.g. Joonas Sandell)
  • {{production-url}}: Production URL url of the project (e.g. https://project-name.com. Add without trailing slash.)
  • {{git-ssh}}: Project's remote SSH Git URL
  • {{acf-key}}: ACF subscription key (e.g. 9wZ...)
  • {{acf-pw}}: ACF password (e.g. https://registeredacfdomain.com)

ACF subscription key can be found from your account and password can be an existing site that is already active for the license key or your new site url.

3. Install dependencies and bootstrap

Make sure your Docker is running, ports 8000 and 13306 are not in use and you're using node version 14.16.0. If you don't want the preconfigured database, delete the file web/wordpress.sql.

make start

If you're unable to run this, please refer to the Makefile and run the scripts manually.

5. Setup WordPress

Login to the WordPress Admin dashboard with the credentials: @admin / root to see that everything works properly. If you didn't use the preconfigured database, then setup WordPress, activate ACF and other plugins, and sync theme's ACF fields. Add ACF license key so that you're able to use it.

6. Install theme dependencies and start theme development

Go to web/wp-content/themes/{{theme-dir}} and run:

composer install && npm install

Start you theme development with npm run dev and navigate to localhost:8000.

7. Recommended actions

Run the bootstrap script which will remove this file and rename PROJECT.md to README.md among other actions. See the new README to learn about available scripts and make sure it contains correct information.

make bootstrap

Other essential actions:

  • Change the WordPress admin credentials
  • Git initialise and add your first commit (e.g. git init && git add . && git commit -m "Init")
  • Once you have added data to your project you should create your own MySQL dump with make db-commit and commit the newly created dump (database/wordpress.sql)
  • Keep your projects README in sync with the changes you make
  • Remove the bootstrap script from Makefile

Happy developing!

Changelog

See CHANGELOG.

Issues & FAQ

See Issues and FAQ.

License

Licensed under the MIT license.