Module 0: Environment Setup

Setting up a professional WordPress development environment on Mac and Windows.

🚀 Why this matters

Before writing a single line of code, you need a robust local environment. We will move away from XAMPP/MAMP and use industry-standard tools like LocalWP (for beginners/intermediates) and Docker (for advanced engineering).

1. Install LocalWP (Recommended)

LocalWP is the fastest way to spin up a WordPress site locally. It handles PHP versions, MySQL, and Nginx/Apache for you.

macOS & Windows Steps:

  1. Download LocalWP and install it.
  2. Open LocalWP and click the + button to create a new site.
  3. Choose "Create a new site" -> Continue.
  4. Name your site (e.g., wordpress-dev.local).
  5. Choose Preferred environment (PHP 8.x, Nginx, MySQL 8.0).
  6. Set up your WordPress username and password.
  7. Click Add Site.

🎉 You now have a running WordPress site at http://wordpress-dev.local.

⚠️ Production Parity Note: LocalWP uses MySQL by default. However, our enterprise stack (Module 4 & 5) uses PostgreSQL via the `pg4wp` driver.

For this "Crash Course" and basic theme development, MySQL is fine. But if you want strict production parity locally, you should use Docker or Lando to spin up a WordPress + PostgreSQL environment. We will cover the PostgreSQL migration in Module 4.

2. Install VS Code & Extensions

Visual Studio Code is the industry standard editor.

  1. Download VS Code.
  2. Install these essential extensions:
    • PHP Intelephense (Ben Mewburn) - For code completion.
    • WordPress Snippets - For common WP functions.
    • Prettier - For formatting CSS/JS.

3. Install Node.js & Composer

Modern WordPress development (Bedrock, Sage, Block Editor) requires these tools.

macOS (using Homebrew):

# Install Homebrew if you haven't
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Node.js (LTS)
brew install node

# Install Composer
brew install composer

Windows:

  1. Download and install Node.js (LTS).
  2. Download and install Composer Setup.exe.
  3. Restart your terminal (PowerShell or Git Bash).

Verify Installation:

node -v
# v18.x.x or higher

composer -v
# Composer version 2.x.x

Common Setup Issues

Next: Module 1 - Modern Setup (Bedrock) →