An open API service indexing awesome lists of open source software.

https://github.com/dylanblokhuis/wp-pkg

Simple tool for packaging your WordPress project.
https://github.com/dylanblokhuis/wp-pkg

cli database dump migrate rust wordpress wp-pkg

Last synced: 2 months ago
JSON representation

Simple tool for packaging your WordPress project.

Awesome Lists containing this project

README

        

# wp-pkg

Simple tool for packaging your WordPress project and database. Ignores non versioned files like node_modules and .git

## Installation

```bash
$ brew install dylanblokhuis/wp-pkg/wp-pkg
```

or [download](https://github.com/dylanblokhuis/wp-pkg/releases) the binaries and put them in your $PATH variable

## Usage

```bash
$ wp-pkg
```

## How to enable search and replace

```php
// wp-config.php
define('DEV_SITE_DOMAIN', 'localhost:3000');
define('PROD_SITE_DOMAIN', 'my-production-site.com');
```

## How to use with Local by Flywheel

Local uses a different mysql socket for each website, to make wp-pkg work you need to specify the path to your mysql socket.

```php
// wp-config.php
define( 'DB_SOCKET', '/Users//Library/Application Support/Local/run//mysql/mysqld.sock' );
```

Screenshot showcasing the Local by Flywheel database socket location

# Roadmap

- zips the wp-content folder with ignoring things like node_modules/.git etc ✔️
- uses the wp-config file to export the database ✔️
- search and replace the serialized stuff ✔️