{"id":25703335,"url":"https://github.com/cododel/wp_plugin_dev_kit","last_synced_at":"2025-02-25T05:28:52.221Z","repository":{"id":45011280,"uuid":"471650321","full_name":"cododel/wp_plugin_dev_kit","owner":"cododel","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-28T11:39:49.000Z","size":1511,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T12:31:45.883Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/cododel.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}},"created_at":"2022-03-19T09:36:01.000Z","updated_at":"2022-11-04T17:39:37.000Z","dependencies_parsed_at":"2022-09-22T16:00:48.663Z","dependency_job_id":null,"html_url":"https://github.com/cododel/wp_plugin_dev_kit","commit_stats":null,"previous_names":["websmithcode/wp_plugin_dev_kit","cododel/wp_plugin_dev_kit"],"tags_count":1,"template":true,"template_full_name":"cododel/wp_docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cododel%2Fwp_plugin_dev_kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cododel%2Fwp_plugin_dev_kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cododel%2Fwp_plugin_dev_kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cododel%2Fwp_plugin_dev_kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cododel","download_url":"https://codeload.github.com/cododel/wp_plugin_dev_kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240610244,"owners_count":19828760,"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","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":[],"created_at":"2025-02-25T05:28:51.529Z","updated_at":"2025-02-25T05:28:52.138Z","avatar_url":"https://github.com/cododel.png","language":"PHP","readme":"# WPDC - WordPress Docker Compose\n\nEasy WordPress development with Docker and Docker Compose.\n\nWith this project you can quickly run the following:\n\n- [WordPress and WP CLI](https://hub.docker.com/_/wordpress/)\n- [phpMyAdmin](https://hub.docker.com/_/phpmyadmin//)\n- [MySQL](https://hub.docker.com/_/mysql/)\n\nContents:\n\n- [Requirements](#requirements)\n- [Configuration](#configuration)\n- [Installation](#installation)\n- [Usage](#usage)\n\n## Requirements\n\nMake sure you have the latest versions of **Docker** and **Docker Compose** installed on your machine.\n\nClone this repository or copy the files from this repository into a new folder. In the **docker-compose.yml** file you may change the IP address (in case you run multiple containers) or the database from MySQL to MariaDB.\n\nMake sure to [add your user to the `docker` group](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) when using Linux.\n\n## Configuration\n\nCopy the example environment into `.env`\n\n```\ncp env.example .env\n```\n\nEdit the `.env` file to change the default IP address, MySQL root password and WordPress database name.\n\n## Installation\n\nOpen a terminal and `cd` to the folder in which `docker-compose.yml` is saved and run:\n\n```\ndocker-compose up\n```\n\nThis creates two new folders next to your `docker-compose.yml` file.\n\n* `wp-data` – used to store and restore database dumps\n* `wp-app` – the location of your WordPress application\n\nThe containers are now built and running. You should be able to access the WordPress installation with the configured IP in the browser address. By default it is `http://127.0.0.1`.\n\nFor convenience you may add a new entry into your hosts file.\n\n## Usage\n\n### Starting containers\n\nYou can start the containers with the `up` command in daemon mode (by adding `-d` as an argument) or by using the `start` command:\n\n```\ndocker-compose start\n```\n\n### Stopping containers\n\n```\ndocker-compose stop\n```\n\n### Removing containers\n\nTo stop and remove all the containers use the`down` command:\n\n```\ndocker-compose down\n```\n\nUse `-v` if you need to remove the database volume which is used to persist the database:\n\n```\ndocker-compose down -v\n```\n\n### Project from existing source\n\nCopy the `docker-compose.yml` file into a new directory. In the directory you create two folders:\n\n* `wp-data` – here you add the database dump\n* `wp-app` – here you copy your existing WordPress code\n\nYou can now use the `up` command:\n\n```\ndocker-compose up\n```\n\nThis will create the containers and populate the database with the given dump. You may set your host entry and change it in the database, or you simply overwrite it in `wp-config.php` by adding:\n\n```\ndefine('WP_HOME','http://127.0.0.1:8080');\ndefine('WP_SITEURL','http://127.0.0.1:8080');\n```\n\n### Creating database dumps\n\n```\n./msqldump.sh\n```\n\n### Developing a Theme\n\nConfigure the volume to load the theme in the container in the `docker-compose.yml`:\n\n```\nvolumes:\n  - ./theme-name/:/var/www/html/wp-content/themes/theme-name\n```\n\n### Developing a Plugin\n\nConfigure the volume to load the plugin in the container in the `docker-compose.yml`:\n\n```\nvolumes:\n  - ./plugin-name/:/var/www/html/wp-content/plugins/plugin-name\n```\n\n### WP CLI\n\nThe docker compose configuration also provides a service for using the [WordPress CLI](https://developer.wordpress.org/cli/commands/).\n\nSample command to install WordPress:\n\n```\ndocker-compose run --rm wpcli core install --url=http://localhost --title=test --admin_user=admin --admin_email=test@example.com\n```\n\nOr to list installed plugins:\n\n```\ndocker-compose run --rm wpcli plugin list\n```\n\nFor an easier usage you may consider adding an alias for the CLI:\n\n```\nalias wp=\"docker-compose run --rm wpcli\"\n```\n\nThis way you can use the CLI command above as follows:\n\n```\nwp plugin list\n```\n\n### phpMyAdmin\n\nYou can also visit `http://127.0.0.1:8080` to access phpMyAdmin after starting the containers.\n\nThe default username is `root`, and the password is the same as supplied in the `.env` file.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcododel%2Fwp_plugin_dev_kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcododel%2Fwp_plugin_dev_kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcododel%2Fwp_plugin_dev_kit/lists"}