{"id":15522464,"url":"https://github.com/imranhsayed/wordpress-docker-wp-cli","last_synced_at":"2025-08-21T09:07:47.677Z","repository":{"id":97033131,"uuid":"305146021","full_name":"imranhsayed/wordpress-docker-wp-cli","owner":"imranhsayed","description":"An example of WordPress with Docker and WP-CLI setup","archived":false,"fork":false,"pushed_at":"2020-10-18T16:36:05.000Z","size":34,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-31T08:00:19.982Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imranhsayed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-10-18T16:29:33.000Z","updated_at":"2021-12-25T17:47:30.000Z","dependencies_parsed_at":"2024-03-09T03:15:55.200Z","dependency_job_id":null,"html_url":"https://github.com/imranhsayed/wordpress-docker-wp-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imranhsayed/wordpress-docker-wp-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Fwordpress-docker-wp-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Fwordpress-docker-wp-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Fwordpress-docker-wp-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Fwordpress-docker-wp-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imranhsayed","download_url":"https://codeload.github.com/imranhsayed/wordpress-docker-wp-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Fwordpress-docker-wp-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271455204,"owners_count":24762701,"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-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-10-02T10:41:14.498Z","updated_at":"2025-08-21T09:07:47.652Z","avatar_url":"https://github.com/imranhsayed.png","language":"Shell","readme":"## 🎨 WordPress Docker Setup with WPCLI\n[![Project Status: Active.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n![Stars](https://img.shields.io/github/stars/imranhsayed/wordpress-docker-wp-cli?label=%E2%AD%90%20Stars)\n![Forks](https://img.shields.io/github/forks/imranhsayed/wordpress-docker-wp-cli?color=%23ff69b4)\n![Contributors](https://img.shields.io/github/contributors/imranhsayed/wordpress-docker-wp-cli?color=blue)\n![Follow](https://img.shields.io/github/followers/imranhsayed?label=Please%20follow%20%20to%20support%20my%20work%20%F0%9F%99%8F\u0026style=social)\n\n- WordPress Setup with Docker.\n- mysql\n- phpMyAdmin\n- wp-cli\n\n## Setup\nRun this from root\n```bash\ndocker-compose -f docker-compose.yml up -d \n```\n\n*WordPress* will be available on [http://localhost:8020](http://localhost:8020)\n\n*[phpMyAdmin](https://github.com/phpmyadmin/phpmyadmin)*: You can access php myadmin on [http://localhost:8183](http://localhost:8183)\n```shell script\nport: mysql:3306\nusername: root\npassword: root\n``` \n\nphpmyadmin docker image already comes with the username `root` and we have set the mysql password in the dockerfile\n\n* If you happen to use your own WordPress setup, be sure to install and activate plugins from composer.json and add your own WordPress site URL\nin an .env file, You can check the .env-example file for reference.\n\n## Development ( Developers only )\n\n1. When we change the composer.json, run from root\n```shell script\ndocker-compose -f docker-compose.yml down \u0026\u0026 \\\ndocker-compose -f docker-compose.yml up -d \n```\n\nFirst line command will stops and removes all the docker containers and second line command will restart all containers.\nNotice that `-d` is to run in detach mode and you can always remove that flag, and run the command so you can see the live logs.\nOr you can check the logs for \n\n2. Check the logs\nWhile the above command is running in detached mode ( -d ), you can run this command in a new terminal tab to see the live logs.\n```shell script\ndocker logs -f container-name\n```\n\ne.g.\n```bash\ndocker container ls\n```\n\n#### result\n```shell script\nCONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                  NAMES\nd0b4a3b0074f        wordpress:latest    \"docker-entrypoint.s…\"   About a minute ago   Up About a minute   0.0.0.0:8000-\u003e80/tcp   backend_wordpress_1\naad078ebe131        mysql:5.7           \"docker-entrypoint.s…\"   About a minute ago   Up About a minute   3306/tcp, 33060/tcp    backend_db_1\n```\nHere container-name is `backend_db_1` or `backend_wordpress_1`\n\n3. If you make changes to docker-compose.yml file, run the following:\n\nIf you happend to change the port in `docker-compose.yml` make sure to delete the `db` directory and then run below.\n\n```shell script\ndocker-compose -f docker-compose.yml down \u0026\u0026 \\\ndocker-compose -f docker-compose.yml up -d\n```\n\n## Debugging\n\n1. If you get 404 on requests, check to see that the .htaccess file in wordpress directory has the rules\n\n```shell script\n# BEGIN WordPress\n# The directives (lines) between \"BEGIN WordPress\" and \"END WordPress\" are\n# dynamically generated, and should only be modified via WordPress filters.\n# Any changes to the directives between these markers will be overwritten.\n\u003cIfModule mod_rewrite.c\u003e\nRewriteEngine On\nRewriteBase /\nRewriteRule ^index\\.php$ - [L]\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule . /index.php [L]\n\u003c/IfModule\u003e\n\n# END WordPress\n```\n\n## References for Docker Images.\n\n1. [phpMyAdmin](https://github.com/fuadajip/dockercompose-mysql-phpmyadmin/blob/master/docker-compose.yml)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranhsayed%2Fwordpress-docker-wp-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimranhsayed%2Fwordpress-docker-wp-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranhsayed%2Fwordpress-docker-wp-cli/lists"}