Skip to content

Local Development Setup

PM Summary: Developers use Laravel Valet or MAMP as the primary local setup. Docker is also supported. Document root must point to _project/_web.


This project uses Laravel Valet or MAMP for local development. Docker is also available as an alternative.

Prerequisites

  • PHP (compatible with WordPress 6.2.2; PHP 7.4+ recommended)
  • MySQL or MariaDB
  • Node.js and npm
  • Laravel Valet or MAMP or Docker

Option A: Laravel Valet

1. Install Valet

bash
composer global require laravel/valet
valet install

The document root must be _project/_web:

bash
cd /path/to/Dezeen.com/_project/_web
valet link dezeen

The site will be available at http://dezeen.test (or the configured TLD).

Alternatively, from the project root:

bash
cd /path/to/Dezeen.com
valet park

Ensure the document root for the parked site points to _project/_web within the project.

3. Create a database

Create a MySQL database for the project (e.g. dezeen_local).


Option B: MAMP

1. Configure MAMP

  1. Start MAMP
  2. Set the document root to _project/_web within this project
  3. Ensure Apache and MySQL are running
  4. Note the URL (e.g. http://localhost:8888 or a configured virtual host)

2. Create a database

Create a MySQL database for the project (e.g. dezeen_local).

3. Document root

Ensure the document root is set correctly to _project/_web in MAMP PRO host settings.


Option C: Docker

1. Start the stack

bash
cd /path/to/Dezeen.com
docker-compose up -d

2. Access points

3. Volumes

Themes, plugins, and mu-plugins are mounted from the host. Changes to PHP files are reflected immediately.


Configuration (All Options)

1. wp-config.php

wp-config.php is not in version control. Create it from a template or copy from an existing environment. Ensure it includes:

  • Database credentials
  • ENVIRONMENT constant set to dev, local, or development
  • STATIC_ASSETS_DIRECTORY and DZN_TEMPLATE_DIRECTORY (see CLAUDE.md or production config)
  • API keys if testing integrations (Algolia, Campaign Monitor)
  • vetg_ as the table prefix

2. Database

  • Import a sanitised production backup, or
  • Use a slimmed database: the main README includes a query to keep only the past 6 months of posts for local use

3. Build assets

bash
# Main theme
cd _project/_web
npm install
npm run dev
# or npm run watch for development

# 2025Dezeen theme (if working on it)
cd _project/_web/wp-content/themes/2025Dezeen
npm install
npm run dev

4. URL updates

After importing a database, update the site URLs:

sql
UPDATE vetg_options SET option_value = 'http://dezeen.test' WHERE option_name IN ('siteurl', 'home');

(Adjust the URL for MAMP or Docker as needed.)


Troubleshooting

If permalinks return 404s:

  1. Go to Settings → Permalinks
  2. Click "Save Changes" (no need to change anything)

Sass build issues

If you have Sass problems, ensure libsass is installed:

bash
brew install libsass

If issues persist, try:

bash
LIBSASS_EXT="no" npm install

Theme assets

Theme assets must be compiled. Run npm run watch in _project/_web:

bash
cd _project/_web
npm run watch

PHP version

Ensure PHP version is compatible with WordPress 6.2.2 and the plugins in use. Production may run PHP 7.4; local can use PHP 8.x for testing upgrades.

Database prefix

The repository uses vetg_ as the table prefix. Ensure your wp-config.php defines:

php
$table_prefix = 'vetg_';

Key Paths

PathDescription
_project/_web/WordPress root
_project/_web/wp-content/themes/2016dezeen/Production theme
_project/_web/wp-content/plugins/dezeen-*/Custom plugins
_project/_web/wp-content/mu-plugins/Must-use plugins