Simple tool for packaging your WordPress project and database. Ignores non versioned files like node_modules and .git
$ brew install dylanblokhuis/wp-pkg/wp-pkg
or download the binaries and put them in your $PATH variable
$ wp-pkg <path>
// wp-config.php
define('DEV_SITE_DOMAIN', 'localhost:3000');
define('PROD_SITE_DOMAIN', 'my-production-site.com');
Local uses a different mysql socket for each website, to make wp-pkg work you need to specify the path to your mysql socket.
// wp-config.php
define( 'DB_SOCKET', '/Users/<user>/Library/Application Support/Local/run/<site_id>/mysql/mysqld.sock' );
- 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 ✔️