Cloning the Boilerplate Theme & Installing WordPress
This guide will walk you through setting up our WordPress boilerplate theme for local development.
Prerequisites
Before starting, ensure you have:
- Laravel Herd installed and running
- Ensure the Laravel Herd settings are configure with Memory to -1 and Upload to 256mb
- Composer installed globally
- Node.js (v18+) and npm installed
- Git configured with your credentials
Getting Started
Step 1: Clone the Boilerplate Theme
- Open your terminal
- Navigate to your project directory:
cd ~/Developer - Clone the repository:
git clone https://github.com/StartDigitalAU/boilerroom introductorytask - Navigate into the project:
cd introductorytask
Step 2: Install PHP Dependencies
- Install Composer dependencies:
This will install all required PHP packages, WordPress core files and the theme's node dependencies.
composer install
Step 3: Database Setup
- Open TablePlus or your preferred database client
- Create a new MySQL database:
- Name: introductorytask (or your project name)
- Charset: utf8mb4
- Collation: utf8mb4_unicode_ci
- Update your .env file with database credentials:
DB_NAME=introductorytask
DB_USER=root
DB_PASSWORD=password
DB_HOST=localhost
Step 4: Configure Security Keys
- Visit the Roots Salts Generator
- Copy the generated security keys
- Paste them into your .env file, replacing the placeholder values
Step 5: WordPress Installation
- Start your local server using Laravel Herd
- Open your browser and navigate to:
http://introductorytask.test - Complete the WordPress installation wizard:
- Site Title: Your Project Name
- Username: Choose a secure username
- Password: Generate a strong password
- Email: Your work email address
Step 6: Start Development Server
- Navigate to the theme directory:
cd wp-content/themes/startdigital - Install Node.js dependencies:
npm install - Start the development server:
This will compile assets and watch for changes.
npm run dev
Step 7: Set Up Version Control
-
Create a new GitHub repository
-
Update the remote URL:
git remote set-url origin https://github.com/StartDigitalAU/introductory-task -
Verify the new remote:
git remote -v -
Push your initial commit:
git push -u origin main
Boilerroom npx Command
Now in the future you can create a new project & database by running the following command in your terminal:
npx create-boilerroom-app <project-name>