Skip to content

correctiv/wp-kunst-journalismus

Repository files navigation

WP Kunst Journalismus

A WordPress development environment for the Kunst Journalismus project using wp-env for local development.

About

This repository serves as the central point where all developments regarding the webpage are collected and can be deployed. It includes a custom WordPress theme (kuj-theme) and uses WordPress's local development environment tool for easy setup and testing.

Tech Stack

  • WordPress (German v6.8.3)
  • wp-env - WordPress local development environment
  • PHP 8.2
  • Node.js - for build tools and package management
  • Composer - for PHP dependency management

Prerequisites

Make sure you have the following installed on your system:

Installation

  1. Install Node.js dependencies:

    npm install
  2. Install Composer dependencies:

    composer install

Development

Starting the Development Environment

To start the WordPress development environment:

npm start

This will:

  • Start the WordPress environment using wp-env
  • Set up WordPress with German localization
  • Activate the custom kuj-theme
  • Enable WordPress debug mode
  • Mount the uploads directory to ./data/uploads

The site will be available at:

Stopping the Environment

To stop the development environment:

npm stop

Code Quality & Linting

The project includes various linting and code quality tools:

PHP Code Standards:

# Check PHP code standards
npm run lint:php

# Auto-fix PHP code standards
npm run lintfix:php

JavaScript/CSS Linting:

# Lint JavaScript
npm run lint:js

# Auto-fix JavaScript issues
npm run lintfix:js

# Lint CSS
npm run lint:css

Internationalization (i18n)

The theme supports German localization:

# Prepare translation files
npm run i18n:prepare

# Compile translation files
npm run i18n:compile

Project Structure

├── .wp-env.json          # wp-env configuration
├── package.json          # Node.js dependencies and scripts
├── composer.json         # PHP dependencies
├── data/
│   └── uploads/          # WordPress uploads directory
└── kuj-theme/            # Custom WordPress theme

Contributing

  1. Follow WordPress coding standards
  2. Use the provided linting tools before committing
  3. Ensure all translations are properly compiled
  4. Test changes in the local wp-env environment

Troubleshooting

Environment won't start:

  • Make sure Docker is running
  • Check if ports 8888 and 8889 are available
  • Try npm run stop and then npm start again

Theme not showing:

  • The theme should auto-activate, but you can manually activate it in wp-admin
  • Check that the theme files are in the kuj-theme directory

Permission issues with uploads:

  • Make sure the data/uploads directory has proper write permissions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors