Socket
Book a DemoInstallSign in
Socket

wp-setup

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wp-setup

Easily create replicable local WordPress environments with Docker

1.3.0
latest
Source
npmnpm
Version published
Weekly downloads
7
-72%
Maintainers
1
Weekly downloads
 
Created
Source

A simple and powerful WordPress environment

Features

  • Dockerized WordPress - Run WordPress in a Docker container.
  • FrankenPHP - The Modern PHP App Server, written in Go.
  • WP-CLI - The command line interface for WordPress.
  • PHPUnit 10 - The PHP testing framework.
  • Pest 2 - The elegant PHP testing framework.
  • Xdebug - The PHP debugger.
  • Dev Container Support - Easily run your project with Visual Studio Code.
  • Node 22 - The Node.js runtime in CLI's container with npm, yarn and pnpm support.

Pre-requisites

  • Docker
  • Node.js >= 18

Yes, you do not need any server, MySQL database or even PHP. All will run from our custom docker environment.

Installation

Although it is possible and in some cases recommended to install WP Setup globally, we recommend to install at project basis. This way all configuration will bee keep in your project and can be easily replicate by all your team members. It can drastically reduce new tem members onboarding and facilitate project replication and testing.

So to add it in your project, first ensure you have a npm package started. If not you just need to run the following command in our project directory:

npm init -y

Then you can simply add WP Setup as a development dependency to your project and call the init command to create your setup file.

npm install wp-setup --save-dev
npx wp-setup init

This commands will install WP Setup and will create a file called wp-setup.json in your project root directory. This file is responsible for all your configurations.

As you can see in the commands above, after install the WP Setup as dependency, you can run our CLI calling npx wp-setup <comand...>. To simplify some usual commands, we recommend that you also add the following scripts to your package.json file (created after npm init).

"scripts": {
    "env:start": "wp-setup start",
    "env:stop": "wp-setup stop",
    "env:destroy": "wp-setup destroy",
    "env:composer": "wp-setup run wp-cli --workdir . composer",
    "env:pest": "wp-setup run wp-test-cli --workdir . global-pest"
}

Now you can simply start your new environment just calling:

npm run env:start
# or
npx wp-setup start

And to stop the environment:

npm run env:stop
# or
npx wp-setup stop

Also you can destroy the current environmend installation with all volumes running:

npx wp-setup destroy

Code Reference

If you find this project useful, please consider giving it a Star on GitHub!

For more details, check out the project documentation: - WP Setup

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

cli

FAQs

Package last updated on 07 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.