Appearance
Project Setup
This guide covers the initial project setup steps after cloning or copying the LamaPress boilerplate.
Table of Contents
Overview
After cloning or copying LamaPress, you need to set up dependencies, configure the environment, and build assets before starting development.
Initial Setup Steps
1. Install Dependencies
Install Node.js dependencies:
bash
npm installThis installs:
- Vite and build tools
- Tailwind CSS and plugins
- JavaScript dependencies (GSAP, Swup, etc.)
2. Configure Environment
Set up your WordPress environment:
- Create
.envfile (if using environment variables) - Configure
wp-config.phpwith database credentials - Set WordPress constants (if needed)
3. Set Up WordPress
- Create database for your WordPress installation
- Run WordPress installer or import existing database
- Activate theme in WordPress admin
- Install required plugins (ACF Pro, etc.)
4. Build Assets
Build assets for the first time:
bash
npm run buildOr start the development server:
bash
npm run devProject Configuration
Theme Information
Update theme information in style.css:
css
/*
Theme Name: Your Theme Name
Theme URI: https://your-site.com
Description: Your theme description
Author: Your Name
Author URI: https://your-site.com
Version: 1.0.0
*/Post Types
Configure custom post types in config/post-types.php:
php
<?php
return [
'your_post_type' => [
'name' => 'Your Post Type',
'singular_name' => 'Your Post Type',
'menu_icon' => 'dashicons-admin-post',
'template' => 'components/templates/your-template.php',
],
];See Post Types & Taxonomies for details.
Taxonomies
Configure custom taxonomies in config/taxonomies.php:
php
<?php
return [
'your_taxonomy' => [
'post_types' => 'your_post_type',
'name' => 'Your Taxonomy',
'singular_name' => 'Your Taxonomy',
],
];Menus
Configure menus in config/menus.php:
php
<?php
return [
'primary' => 'Primary Navigation',
'footer' => 'Footer Navigation',
];First Steps
Create Your First Template
- Create
components/templates/home.php:
php
<?php
/* Template name: Home */
defined('ABSPATH') || exit;
llStartTemplate();
llSection('hero_basic', 'home_hero');
llSection('rich_content', 'home_content');
llEndTemplate();- Register in
config/post-templates.php:
php
return [
'page' => [
'home.php' => 'Home',
],
];See Templates System for details.
Create Your First Section
- Create
components/sections/hero_basic/index.php - Create
components/sections/hero_basic/acf.php - Use
llSection('hero_basic', 'unique_key')in templates
See Component System for details.
Test the Build
- Start dev server:
npm run dev - Visit site in browser
- Check console for errors
- Test page transitions (if using Swup)
- Verify assets are loading
Best Practices
1. Version Control
Initialize Git (if not already):
bash
git init
git add .
git commit -m "Initial commit"Important: Don't commit:
node_modules/dist/(build output).envfiles- WordPress core files
2. Environment Variables
Use environment variables for:
- API keys
- Database credentials (if needed)
- Environment-specific settings
Store in .env and add to .gitignore.
3. Documentation
- Update
README.mdwith project-specific information - Document custom configurations
- Add project-specific examples to docs
Related Documentation
- Getting Started - Quick start guide
- Development Environment - Environment setup
- Component System - Component creation
- Templates System - Template creation
- Build Process - Build system
Next Steps:
- Review Component System to create components
- Check Templates System for template setup
- See Development Workflow for daily workflow