Skip to content

Create New Project

The lamapress:new command automates the entire setup process for a new LamaPress project. It creates a WordPress installation, installs plugins, sets up the theme, and optionally initializes a Git repository.

Usage

bash
clli lamapress:new [project-name]

Arguments

  • project-name (optional) - The name of your project. If not provided, you'll be prompted to enter it.

Options

  • -v, --verbose - Enable verbose output for debugging. Shows detailed output from all commands.

Examples

Create a project with a name:

bash
clli lamapress:new my-project

Interactive mode (prompts for project name):

bash
clli lamapress:new

Verbose mode for debugging:

bash
clli lamapress:new my-project -v

What It Does

The command performs the following steps:

  1. Verifies directory - Checks that the target directory doesn't already exist
  2. Creates WordPress installation - Downloads WordPress core and creates database
  3. Configures WordPress - Sets up optimal WordPress settings
  4. Adds users - Creates admin users
  5. Installs plugins - Installs and activates required plugins
  6. Sets up theme - Clones LamaPress boilerplate and configures it
  7. Creates project config - Initializes project configuration file
  8. Initializes Git (optional) - Creates Git repository and pushes to GitHub
  9. Builds assets - Installs dependencies and builds production assets

What Gets Installed

WordPress Plugins

Activated Plugins:

  • Advanced Custom Fields Pro (premium)
  • WP Migrate DB Pro (premium)
  • Yoast SEO
  • ACF Content Analysis for Yoast SEO
  • Classic Editor
  • Intuitive Custom Post Order
  • User Switching
  • WP Mail SMTP
  • Tiny Compress Images
  • Duplicate Post
  • Redirection

Inactive Plugins:

  • Wordfence
  • Restricted Site Access
  • WP Rocket (premium)

WordPress Configuration

The command configures WordPress with these settings:

  • Front Page: Sets up a "Home" page as the front page
  • Timezone: Europe/Amsterdam
  • Date Format: d/m/Y
  • Time Format: H:i
  • Permalink Structure: /%postname%/
  • Pingbacks: Disabled by default
  • Comments: Disabled by default
  • Default Content: Removes Hello World post and sample pages

Theme Setup

  • Clones the LamaPress boilerplate from GitHub
  • Installs Composer dependencies
  • Installs npm dependencies
  • Builds production assets
  • Activates the theme
  • Removes default WordPress themes (Twenty Twenty Three, Four, Five)

After Running

Once the command completes, you'll see output like:

LamaPress ready on [http://my-project-name.test]. Build something unexpected.
Admin ready on [http://my-project-name.test/wp-admin]. Manage your website here.
Username: lamalama
Password: [generated-password]

Important: Save the admin password shown in the output, as it's randomly generated.

Git Repository Setup

If you choose to initialize a Git repository:

  • A new private GitHub repository is created under the lamalamaNL organization
  • The initial commit is pushed to the main branch
  • A develop branch is created and pushed

Requirements:

  • GitHub CLI (gh) must be installed
  • You must be authenticated with GitHub (gh auth login)
  • You must have access to the lamalamaNL organization

If GitHub CLI is not available, the command will skip this step with a warning and continue.

Configuration Requirements

The following configuration keys are used (if available):

  • wp_migrate_license_key - Automatically configures WP Migrate DB Pro with your license key

See Configuration for details on setting up these keys.

Troubleshooting

Theme Clone Fails

If the theme clone fails:

  1. Check your internet connection
  2. Verify GitHub access: https://github.com/lamalamaNL/lamapress
  3. Check if you're behind a corporate firewall
  4. Try running manually: git clone https://github.com/lamalamaNL/lamapress.git test
  5. Set up SSH keys: ssh-keygen -t ed25519 -C "your_email@example.com"
  6. Authenticate with GitHub CLI: gh auth login

GitHub Repository Creation Fails

If GitHub repository creation fails:

  1. Verify GitHub CLI is installed: gh --version
  2. Authenticate with GitHub: gh auth login
  3. Verify you have access to the lamalamaNL organization
  4. The command will continue without creating the repository if GitHub CLI is not available

Build Errors

If asset building fails:

  1. Check Node.js version: node --version (should be v24 LTS)
  2. Try running manually: cd wp-content/themes/my-project && npm install && npm run build
  3. Check for error messages in verbose mode: clli lamapress:new my-project -v

Released under the MIT License.