{"id":14955169,"url":"https://github.com/aivec/wp-docker-dev-factory","last_synced_at":"2025-07-22T21:35:47.122Z","repository":{"id":41707905,"uuid":"203693324","full_name":"aivec/wp-docker-dev-factory","owner":"aivec","description":"Easy creation and management of local WordPress development environments with Docker. JSON config files with an interactive CLI","archived":false,"fork":false,"pushed_at":"2025-06-19T21:21:55.000Z","size":763,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-19T22:27:47.694Z","etag":null,"topics":["bash","docker","docker-compose","php","typescript","wordpress","wordpress-boilerplate","wordpress-development","wp-cli"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aivec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-22T01:44:42.000Z","updated_at":"2024-08-02T04:07:46.000Z","dependencies_parsed_at":"2024-08-02T05:25:48.911Z","dependency_job_id":"fffce03b-730f-4f08-af30-3f2490f7221b","html_url":"https://github.com/aivec/wp-docker-dev-factory","commit_stats":{"total_commits":80,"total_committers":3,"mean_commits":"26.666666666666668","dds":0.07499999999999996,"last_synced_commit":"ed60ca70ce564fddc38cafea1b2bba6cf161771d"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/aivec/wp-docker-dev-factory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivec%2Fwp-docker-dev-factory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivec%2Fwp-docker-dev-factory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivec%2Fwp-docker-dev-factory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivec%2Fwp-docker-dev-factory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aivec","download_url":"https://codeload.github.com/aivec/wp-docker-dev-factory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivec%2Fwp-docker-dev-factory/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266499449,"owners_count":23938867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","docker","docker-compose","php","typescript","wordpress","wordpress-boilerplate","wordpress-development","wp-cli"],"created_at":"2024-09-24T13:10:36.590Z","updated_at":"2025-07-22T21:35:47.094Z","avatar_url":"https://github.com/aivec.png","language":"TypeScript","readme":"# Local WordPress with Docker (an interactive CLI)\nCreate local WordPress sites with Docker, **the easy way**.\n\n## Why?\nThe purpose of this library is for easy creation *and management* of local WordPress development environments with Docker. Under the hood, this library uses `visiblevc`'s excellent [Docker images](https://github.com/visiblevc/wordpress-starter) as the base and adds CLI options via a `nodejs` script to make environment management even easier.\n\nWith most other tools, the user must manually create and manage `docker-compose.yml` files. This method has several drawbacks though. `docker-compose` files are not tailored to WordPress specifically and require at least basic knowledge of Docker. Docker is a fantastic tool but can eat up a lot of development time. Another big problem for development, in particular, is that `docker-compose` files are intended to be mostly unchanged. Their rigidity is not well suited for development environments. In terms of WordPress, this could be mounting/unmounting plugin/theme folders, changing the PHP version, importing SQL dump files, pulling third-party non-free plugins/themes from an SSH server, etc. \n\nInstead, this tool uses `JSON` files structured specifically for managing WordPress environments. With this approach, you can easily manage environments without any prior knowledge of Docker.\n\nThis library is **only for managing development environments** and is not intended for creating production ready containers.\n\n## Main features:\n- Mount local plugin/theme folders **from anywhere on your system**\n- Download and install plugins/themes **automatically** on start-up\n- Download and install private plugins/themes via SSH/FTP **automatically** on start-up\n- XDebug built-in for easy debugging\n- Local SMTP mail server with [MailHog](https://github.com/mailhog/MailHog)\n- `ngrok` support for easy SSL testing on localhost\n- Take a snapshot of your environment and re-use for significantly reduced start-up time\n- Configurable WordPress version\n- Configurable PHP version (`7.2`, `7.3`, `7.4`, or `8.0`)\n- Configurable PHP environment variables\n- Import a database on environment start-up (with URL replacement)\n- Import and replace the database of a **running** environment (with URL replacement)\n- Export an environments database\n- A single `phpMyAdmin` container for all of your environments\n- Use proxy URL for media files\n- Mount local `uploads` folder\n\n## Table of Contents\n-   [Requirements](#requirements)\n-   [Installation](#installation)\n-   [Quickstart Guide](#quickstart-guide)\n-   [Examples](./examples/)\n-   [CLI Usage](#cli-usage)\n-   [Environments](#environments)\n    -   [Logging in](#logging-in)\n    -   [Lifecycle Details](#lifecycle-details)\n-   [MailHog](#mailhog)\n-   [PHP Debugging](#php-debugging)\n-   [JSON Structure](#json-structure)\n    -   [`instanceName`](#---instancename)\n    -   [`containerPort`](#---containerPort)\n    -   [`phpVersion`](#---phpVersion)\n    -   [`wordpressVersion`](#---wordpressVersion)\n    -   [`locale`](#---locale)\n    -   [`customInitScripts`](#---customInitScripts)\n    -   [`image`](#---image)\n    -   [`uploads`](#---uploads)\n    -   [`uploadsUrl`](#---uploadsUrl)\n    -   [`database`](#---database)\n        -   [`mysqlDumpfile`](#---databasemysqldumpfile)\n        -   [`flushOnRestart`](#---databaseflushonrestart)\n        -   [`dbName`](#---databasedbname)\n        -   [`dbPrefix`](#---databasedbprefix)\n    -   [`env`](#---env)\n    -   [`downloadPlugins`](#---downloadplugins)\n    -   [`downloadThemes`](#---downloadthemes)\n    -   [`localPlugins`](#---localplugins)\n    -   [`localThemes`](#---localthemes)\n    -   [`ftp`](#---ftp)\n        -   [`confname`](#---ftpconfname)\n        -   [`confpath`](#---ftpconfpath)\n        -   [`plugins`](#---ftpplugins)\n        -   [`themes`](#---ftpthemes)\n    -   [`ssh`](#---ssh)\n        -   [`confname`](#---sshconfname)\n        -   [`confpath`](#---sshconfpath)\n        -   [`plugins`](#---sshplugins)\n        -   [`themes`](#---sshthemes)\n-   [FTP/SSH Config Files](#ftpssh-config-files)\n    -   [`FTP`](#ftp-config-files)\n    -   [`SSH`](#ssh-config-files)\n\n## Requirements\n- node・npm\n- docker\n\n## Installation\nInstall globally with `npm`.\n```sh\n$ npm -g install @aivec/wp-docker-dev-factory\n```\n\n## Quickstart Guide\nTo spin-up a minimal environment, create a file named `wp-instances.json` with the following contents:\n```json\n{\n  \"instanceName\": \"my-local-wordpress\",\n  \"containerPort\": 8000,\n  \"locale\": \"en_US\",\n  \"downloadPlugins\": [\"wordpress-plugin-1\", \"wordpress-plugin-2\"],\n  \"downloadThemes\": [\"wordpress-theme-1\", \"wordpress-theme-2\"],\n  \"localPlugins\": [\n    \"/absolute/path/to/plugin/directory\",\n    \"relative/path/to/plugin/directory\",\n    \"../relative/path/to/plugin/directory\"\n  ],\n  \"localThemes\": [\n    \"/absolute/path/to/theme/directory\",\n    \"relative/path/to/theme/directory\",\n    \"../relative/path/to/theme/directory\"\n  ]\n}\n```\nWhere:\n- [`instanceName`](#---instancename) is the environment name and title of your website.\n- [`containerPort`](#---containerPort) is the port number the environment will expose. In this case the final URL will be `localhost:8000`.\n- [`locale`](#---locale) is the language you want for the WordPress install.\n- [`downloadPlugins`](#---downloadplugins) is a list of any number of publicly available WordPress plugins to be downloaded.\n- [`downloadThemes`](#---downloadthemes) is a list of any number of publicly available WordPress themes to be downloaded.\n- [`localPlugins`](#---localplugins) is a list of absolute or relative paths to any number of local plugin folders.\n- [`localThemes`](#---localthemes) is a list of absolute or relative paths to any number of local theme folders.\n\nAfter setting up your config file, invoke the CLI tool from within the folder where your `wp-instances.json` file is saved:\n```sh\n$ aivec-wpdocker\n```\n\nA select prompt will appear:\n\n\u003cimg src=\"media/action-select.png\" alt=\"example action-select\" /\u003e\n\nPress the enter key on `Start WordPress` and wait for the environment to be created (if this is your first time it might take a while). After the environment is created, open your browser and navigate to [localhost:8000/wp-admin](localhost:8000/wp-admin).\n\nYou should see the WordPress login screen. Login with the default username and password `root`.\nThat's it!\n\nA full example config can be found [here](examples/wp-instances.json). For a detailed description of every setting, refer to the [JSON Structure section](#json-structure).\n\n## CLI Usage\nThe CLI is completely interactive. There are two ways to use it:\n1. With no arguments\n2. With a relative/absolute path\n\nIf you invoke `aivec-wpdocker` with no arguments, it will look for a `wp-instances.json` file in the current directory.\n\nAlternatively, you can pass a relative or absolute path as an argument to tell the CLI where it should look for a `wp-instances.json` file. For example, assuming you have a `wp-instances.json` file in a folder called `configs` relative to the current directory, you would invoke the CLI like so:\n```sh\n$ aivec-wpdocker configs\n```\nThe CLI has seven different operations:\n| Operation | Description |\n| ----- | ----------- |\n| `Start WordPress` | This will start the `WordPress` container, as well as create and run the `MySQL` and `phpMyAdmin` containers if they are not already created and running. If the environment's `WordPress` container is already running the CLI will abort with an error. Note that exiting with Ctrl+c will only stop the log stream, not the containers |\n| `Stop WordPress` | This will stop the `WordPress` container for the selected environment. It **will not** stop the `MySQL` and `phpMyAdmin` containers. |\n| `Save snapshot` | This will take a snapshot of the `WordPress` container's **filesystem** and save it as a `.tar` file. You can reference snapshot files with the [image](#---image) key in `wp-instances.json` to significantly reduce start-up time. |\n| `Show server logs` | By default, when you start a `WordPress` container with `Start WordPress`, it will stream the `Apache` logs to standard output. You can use this command to pipe the log stream to your console again if you have exited the stream. |\n| `Launch NGROK (local SSL)` | This will start the `ngrok` client for local SSL. Ctrl+c to stop the client. If you use `ngrok`, we **highly recommend** creating a free account on [ngrok.com](https://ngrok.com) so that you get more connections per minute. |\n| `Update dumpfile` | This will only work if you specified [mysqlDumpfile](#---databasemysqldumpfile) in your config. By invoking this command, the dumpfile, which is mounted as a volume in the container, will be overwritten with a dump of the database of the selected environment |\n| `Create new dumpfile` | This will create a dumpfile from the database of the selected environment and prompt the user to name the dumpfile. The dumpfile will be placed in a folder called `dumpfiles` in the same folder as `wp-instances.json`. If a `dumpfiles` folder does not already exist, it will be created. |\n| `Import database` | This will prompt you to choose from a list of dump files in the `dumpfiles` directory adjacent to `wp-instances.json`. The selected dump file will then be used to **replace** the current database of the selected environment |\n\n## Environments\nConfig files can contain any number of environments. To do so, wrap your config objects in an array:\n```json\n[\n    {\n        \"instanceName\": \"my-local-wordpress-1\",\n        \"containerPort\": 8000,\n        \"locale\": \"en_US\",\n    },\n    {\n        \"instanceName\": \"my-local-wordpress-2\",\n        \"containerPort\": 8010,\n        \"locale\": \"en_US\",\n    },\n]\n```\nThe CLI will then prompt you to choose which environment to use:\n\n\u003cimg src=\"media/instance-select.png\" alt=\"example instance-select\" /\u003e\n\nEvery environment has exactly one `WordPress` container associated with it. Conversely, there is only one `MySQL` and `phpMyAdmin` container used for the databases of *all* `WordPress` environments. The naming pattern for containers is as follows:\n| Container | Name | Example |\n| ----- | ---- | ------ |\n| `MySQL` | aivec_wp_mysql | |\n| `phpMyAdmin` | aivec_wp_pma | |\n| `WordPress` | [instanceName](#---instancename) | test-wordpress |\n### Logging in\nYou can access `phpMyAdmin` at [localhost:22222](localhost:22222) with the following login information:\n- Username: `root`\n- Password: `root`\n\nFor `WordPress` environments that **do not** specify a [mysqlDumpfile](#---databasemysqldumpfile), the login information is the same:\n- Username: `root`\n- Password: `root`\n### Lifecycle details\nThe database for each WordPress environment will only be created **the first time that environment is started**, regardless of whether you set a [mysqlDumpfile](#---databasemysqldumpfile) or not. If you want the database to be re-created every time you [start WordPress](#cli-usage), set [flushOnRestart](#---databaseflushonrestart) to `true`.\n\n## MailHog\nEmails sent via WordPress' built-in `wp_mail` function are caught by [MailHog](#mailhog). All outgoing email can be viewed in a web UI at [localhost:8025](localhost:8025)\n\n## PHP Debugging\nAny environment you create will have `XDebug` installed and configured by default listening on port `9900`. Visual Studio Code users can debug with the [PHP Debug extension](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug). Create a `launch.json` file and place it either in the `.vscode` directory of a workspace folder for a plugin/theme, or the `.vscode` directory of a workspace folder specifically for managing PHP debugging.\n\nFor users who have many plugins and themes scattered across their filesystem, we recommend creating a workspace folder for managing path mappings of all of those environments with a `launch.json` file like the following:\n```json\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Listen for XDebug\",\n      \"type\": \"php\",\n      \"request\": \"launch\",\n      \"port\": 9900,\n      \"pathMappings\": {\n        \"/var/www/html/wp-content/plugins/my-plugin\": \"/home/user/path/to/my-plugin\",\n        \"/var/www/html/wp-content/themes/my-theme\": \"/home/user/path/to/my-theme\"\n      }\n    }\n  ]\n}\n\n```\nFor users who would rather have a separate `launch.json` file for each of their plugin/theme workspaces, the file would look something like this:\n```json\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Listen for XDebug\",\n      \"type\": \"php\",\n      \"request\": \"launch\",\n      \"port\": 9900,\n      \"pathMappings\": {\n        \"/var/www/html/wp-content/plugins/my-plugin\": \"{workspaceRoot}\"\n      }\n    }\n  ]\n}\n```\nSome users prefer to keep all of their plugins and themes in a local WordPress installation folder. For those users, only one `launch.json` file is required:\n```json\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Listen for XDebug\",\n      \"type\": \"php\",\n      \"request\": \"launch\",\n      \"port\": 9900,\n      \"pathMappings\": {\n        \"/var/www/html/wp-content\": \"/absolute/path/to/my/local/wordpress/wp-content\"\n      }\n    }\n  ]\n}\n```\n\n## JSON Structure\nReference for the `wp-instances.json` config file.\n### -- instanceName\n- *Required*\n- *Type: `String`*\n- Description: The `instanceName` becomes the title of your website. Note that even if you import a database with an SQL dumpfile that contains a WordPress install with a different title, `instanceName` will override it.\n\u003chr\u003e\n\n### -- containerPort\n- *Required*\n- *Type: `Number`*\n- Description: This is the port number for the WordPress installation. The final URL is `localhost` with this port number appended. A `containerPort` of 8000 would result in `localhost:8000`.\n\u003chr\u003e\n\n### -- phpVersion\n- *Optional*\n- *Type: `String`*\n- *Default: `7.3`*\n- Description: This is the PHP version Apache will use. Possible values are `7.2`, `7.3`, and `7.4`.\n\u003chr\u003e\n\n### -- wordpressVersion\n- *Optional*\n- *Type: `String`*\n- *Default: `latest`*\n- Description: Specify the WordPress version to install. Accepts any valid semver number, `latest`, or `nightly` for beta builds. Note that `nightly` builds only support the `en_US` [locale](#---locale). If you set this to `nightly` and the [locale](#---locale) is not `en_US`, `en_US` will be used anyways.\n\u003chr\u003e\n\n### -- locale\n- *Optional*\n- *Type: `String`*\n- *Default: `en_US`*\n- Description: This is the locale used by WordPress to determine which language to use.\n\u003chr\u003e\n\n### -- customInitScripts\n- *Optional*\n- *Type: `String[]`*\n- Description: May be any number of absolute or relative paths to `sh` or `bash` scripts to be executed at the end of environment creation. Note that absolute paths are resolved **starting from your home directory** and relative paths are resolved **starting from the folder of the `wp-instances.json` config file**\n\u003chr\u003e\n\n### -- image\n- *Optional*\n- *Type: `String`*\n- Description: Absolute or relative path to a `.tar` snapshot file created with the [`Save snapshot`](#cli-usage) command. Note that absolute paths are resolved **starting from your home directory** and relative paths are resolved **starting from the folder of the `wp-instances.json` config file**\n\u003chr\u003e\n\n### -- uploads\n- *Optional*\n- *Type: `String`*\n- Description: Absolute or relative path to an `uploads` folder. Note that absolute paths are resolved **starting from your home directory** and relative paths are resolved **starting from the folder of the `wp-instances.json` config file**\n\u003chr\u003e\n\n### -- uploadsUrl\n- *Optional*\n- *Type: `String`*\n- Description: Specify a base URL for the `uploads` folder. If specified, any time a WordPress core function such as `wp_get_attachment_url` is called and the file doesn't exist locally, it will be fetched from the URL. Note that the URL should point to the `ABSPATH` of the WordPress install (eg: `https://www.my-site.com/cms` for a site where `uploads` exists at `cms/wp-content/uploads`).\n\u003chr\u003e\n\n### -- database\n- *Optional*\n- *Type: `Object`*\n### -- database.mysqlDumpfile\n- *Optional*\n- *Type: `String`*\n- Description: A relative or absolute path to a `MySQL` dump file with the extension `.sql`. Note that absolute paths are resolved **starting from your home directory** and relative paths are resolved **starting from the folder of the `wp-instances.json` config file**\n### -- database.flushOnRestart\n- *Optional*\n- *Type: `Boolean`*\n- *Default: `false`*\n- Description: If `true`, the database will be re-created every time the WordPress container is stopped and started again.\n### -- database.dbName\n- *Optional*\n- *Type: `String`*\n- Description: By default, if you do not specify a `mysqlDumpfile` then the database name will become the `instanceName`. If you do specify a `mysqlDumpfile` and the database name therein is different than the `instanceName`, you must define this property with the database name defined in the dump file.\n### -- database.dbPrefix\n- *Optional*\n- *Type: `String`*\n- *Default: `wp_`*\n- Description: This is the prefix for table names. Again, if `mysqlDumpfile` is specified but the table prefix therein differs from the default, you must define this property.\n#### Example\n```json\n{\n    \"database\": {\n        \"mysqlDumpfile\": \"dumpfiles/testdatabase.sql\",\n        \"flushOnRestart\": true,\n        \"dbName\": \"dbname\",\n        \"dbPrefix\": \"dbprefix_\"\n    }\n}\n```\n\u003chr\u003e\n\n### -- env\n- *Optional*\n- *Type: `Object`*\n- Description: May be any number of arbitrary key-value pairs to be set as PHP environment variables at start-up. The environment variables can then be accessed in PHP via the PHP environmment global `$_ENV`\n\u003chr\u003e\n\n### -- downloadPlugins\n- *Optional*\n- *Type: `String[]`*\n- Description: May be any number of plugins that you want to be installed during environment creation. The following forms are accepted:\n  - `plugin-slug`: Used when installing a plugin direct from WordPress.org.\n  - `[plugin-slug]http://pluginsite.com/plugin.zip`: Used when installing plugin from URL.\n\u003chr\u003e\n\n### -- downloadThemes\n- *Optional*\n- *Type: `String[]`*\n- Description: May be any number of themes that you want to be installed during environment creation. The following forms are accepted:\n  - `theme-slug`: Used when installing a theme direct from WordPress.org.\n  - `[theme-slug]http://themesite.com/theme.zip`: Used when installing theme from URL.\n\u003chr\u003e\n\n### -- localPlugins\n- *Optional*\n- *Type: `String[]`*\n- Description: May be any number of relative or absolute paths pointing to local plugins that you want mapped into the container. Note that absolute paths are resolved **starting from your home directory** and relative paths are resolved **starting from the folder of the `wp-instances.json` config file**\n\u003chr\u003e\n\n### -- localThemes\n- *Optional*\n- *Type: `String[]`*\n- Description: May be any number of relative or absolute paths pointing to local themes that you want mapped into the container. Note that absolute paths are resolved **starting from your home directory** and relative paths are resolved **starting from the folder of the `wp-instances.json` config file**\n\u003chr\u003e\n\n### -- ftp\n- *Optional*\n- *Type: `Object[]`*\n- Description: `ftp` may contain an array of any number of `ftp` config objects\n### -- ftp[{}.confname]\n- *Optional\\**\n- *Type: `String`*\n- Description: Can refer to either a file of the same name in a folder called `aivec-devenv-configs` which exists in your home folder, or the name of one of the properties specified in a file called `ftp.json` which exists in the `aivec-devenv-configs` folder. If you do not have an `aivec-devenv-configs` folder, create one in your home directory. For more information about FTP config files, refer to the [FTP Config Files section](#ftp-config-files).\n- \\* *Required if `confpath` is not set*\n### -- ftp[{}.confpath]\n- *Optional\\**\n- *Type: `String`*\n- Description: Can be either a relative or absolute path pointing to a `.json` file containing login information. If both `confname` and `confpath` are set, `confpath` will take precedence. For information about FTP config files, refer to the [FTP Config Files section](#ftp-config-files).\n- \\* *Required if `confname` is not set*\n### -- ftp[{}.plugins]\n- *Optional*\n- *Type: `String[]`*\n- Description: Can be any number of relative paths to plugin `.zip` files that exist on the FTP server. Paths are resolved relative to the directory that is opened upon access via FTP. **Do not include the extension `.zip` as part of the file name**.\n### -- ftp[{}.themes]\n- *Optional*\n- *Type: `String[]`*\n- Description: Can be any number of relative paths to theme `.zip` files that exist on the FTP server. Paths are resolved relative to the directory that is opened upon access via FTP. **Do not include the extension `.zip` as part of the file name**.\n#### Example\n```json\n{\n    \"ftp\": [\n        {\n            \"confname\": \"my-ftp-config\",\n            \"plugins\": [\"relative/path/to/plugin/zipfile/noextension\"],\n            \"themes\": [\"relative/path/to/theme/zipfile/noextension\"]\n        },\n        {\n            \"confpath\": \"path/to/ftp-config.json\",\n            \"plugins\": [\"relative/path/to/plugin/zipfile/noextension\"],\n            \"themes\": [\"relative/path/to/theme/zipfile/noextension\"]\n        }\n    ]\n}\n```\n\u003chr\u003e\n\n### -- ssh\n- *Optional*\n- *Type: `Object[]`*\n- Description: `ssh` may contain an array of any number of `ssh` config objects\n### -- ssh[{}.confname]\n- *Optional\\**\n- *Type: `String`*\n- Description: Can refer to either a file of the same name in a folder called `aivec-devenv-configs` which exists in your home folder, or the name of one of the properties specified in a file called `ssh.json` which exists in the `aivec-devenv-configs` folder. If you do not have an `aivec-devenv-configs` folder, create one in your home directory. For more information about SSH config files, refer to the [SSH Config Files section](#ssh-config-files).\n- \\* *Required if `confpath` is not set*\n### -- ssh[{}.confpath]\n- *Optional\\**\n- *Type: `String`*\n- Description: Can be either a relative or absolute path pointing to a `.json` file containing login information. If both `confname` and `confpath` are set, `confpath` will take precedence. For information about SSH config files, refer to the [SSH Config Files section](#ssh-config-files).\n- \\* *Required if `confname` is not set*\n### -- ssh[{}.plugins]\n- *Optional*\n- *Type: `String[]`*\n- Description: Can be any number of relative paths to plugin `.zip` files that exist on the SSH server. Paths are resolved relative to the directory that is opened upon access via SSH. **Do not include the extension `.zip` as part of the file name**.\n### -- ssh[{}.themes]\n- *Optional*\n- *Type: `String[]`*\n- Description: Can be any number of relative paths to theme `.zip` files that exist on the SSH server. Paths are resolved relative to the directory that is opened upon access via SSH. **Do not include the extension `.zip` as part of the file name**.\n#### Example\n```json\n{\n    \"ssh\": [\n        {\n            \"confname\": \"my-ssh-config\",\n            \"plugins\": [\"relative/path/to/plugin/zipfile/noextension\"],\n            \"themes\": [\"relative/path/to/theme/zipfile/noextension\"]\n        },\n        {\n            \"confpath\": \"path/to/ssh-config.json\",\n            \"plugins\": [\"relative/path/to/plugin/zipfile/noextension\"],\n            \"themes\": [\"relative/path/to/theme/zipfile/noextension\"]\n        }\n    ]\n}\n```\n\u003chr\u003e\n\n## FTP/SSH Config Files\nFor security reasons, FTP and SSH login information is not part of the `wp-instances.json` schema. Instead, the SSH and FTP properties in `wp-instances.json` contain a reference to their respective config files that exist elsewhere. This makes it easier and safer to share `wp-instances.json` config files between colleagues and teammates.\n\n### \u003ca name=\"ftp-config-files\"\u003e\u003c/a\u003eFTP\nIf [`confname`](#---ftpconfname) is used for your FTP config and a file named `\u003cconfname\u003e.json` exists in the `aivec-devenv-configs` folder in your home directory, the file must have the following `JSON` structure:\n```json\n{\n  \"host\": \"some-host.com\",\n  \"user\": \"ftpuser\",\n  \"password\": \"somepassword\"\n}\n```\n\nIf [`confpath`](#---ftpconfpath) is used for your FTP config then the `JSON` structure of the file must be the same as above.\n\nAlternatively, if [`confname`](#---ftpconfname) is used for your FTP config and a file named `\u003cconfname\u003e.json` *does not exist* in the `aivec-devenv-configs` folder in your home directory, the CLI will look for a key in `aivec-devenv-configs/ftp.json` with the same name as [`confname`](#---ftpconfname). For example, given that [`confname`](#---ftpconfname) is `my-ftp-conf`, the `ftp.json` would look like this:\n```json\n{\n  \"my-ftp-conf\": {\n    \"host\": \"some-host.com\",\n    \"user\": \"ftpuser\",\n    \"password\": \"somepassword\"\n  }\n}\n```\nThis method allows you to have any number of unique configurations all in the same file.\n\n### \u003ca name=\"ssh-config-files\"\u003e\u003c/a\u003eSSH\nThe same rules used for FTP config resolution also apply to SSH configs. SSH configs must have the following `JSON` structure:\n```json\n{\n  \"host\": \"my-server.com\",\n  \"user\": \"ssh-user\",\n  \"privateKeyPath\": \"relativepath/sshkeys/my_key\"\n}\n```\n`privateKeyPath` can be either a relative or absolute path. Relative paths are resolved **starting from the same folder as the ssh config file**, while absolute paths are resolved **starting from the users home directory**.\n\nAdditionally, the private key **must not be password protected**. There are tools out there like `sshpass` for automating password input for password protected SSH keys, but in our experience this is not very reliable and not worth the effort. Our recommendation is to generate a passwordless SSH key pair where only non-interactive downloads are allowed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faivec%2Fwp-docker-dev-factory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faivec%2Fwp-docker-dev-factory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faivec%2Fwp-docker-dev-factory/lists"}