{"id":19545839,"url":"https://github.com/creative-workflow/wordpress-docker","last_synced_at":"2025-04-26T19:32:04.293Z","repository":{"id":94651938,"uuid":"55407568","full_name":"creative-workflow/wordpress-docker","owner":"creative-workflow","description":"develop wordpress via docker container, don't pollute your dev system","archived":false,"fork":false,"pushed_at":"2017-08-01T17:53:45.000Z","size":7505,"stargazers_count":14,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T22:27:37.621Z","etag":null,"topics":["browsersync","docker","gulp-tasks","nodejs","phpmyadmin","wordpress","wordpress-setup"],"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/creative-workflow.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}},"created_at":"2016-04-04T11:58:01.000Z","updated_at":"2023-06-05T06:40:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce4dcd92-b84b-4345-8abf-d5005cb83acf","html_url":"https://github.com/creative-workflow/wordpress-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creative-workflow%2Fwordpress-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creative-workflow%2Fwordpress-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creative-workflow%2Fwordpress-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creative-workflow%2Fwordpress-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creative-workflow","download_url":"https://codeload.github.com/creative-workflow/wordpress-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251041485,"owners_count":21527204,"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":["browsersync","docker","gulp-tasks","nodejs","phpmyadmin","wordpress","wordpress-setup"],"created_at":"2024-11-11T03:41:34.646Z","updated_at":"2025-04-26T19:32:04.286Z","avatar_url":"https://github.com/creative-workflow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CW - Wordpress Development Setup\nYou will get a running wordpress instance based on the latest wordpress source, a database where the wordpress data will be stored, phpmyadmin for database management and extendible gulp tasks with livereload preconfigured. And this all running inside of docker container so your dev system stays clean =)\n\n## Install the following dependencies\n  * [Docker](https://docs.docker.com/engine/installation)\n  * [Docker Compose](https://docs.docker.com/compose/install/)\n  * [GIT](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n  * [nodeJs](https://nodejs.org) (if you want to use browser-sync or gulp tasks)\n\n## Wordpress up and running in 10 minutes\n\n#### 1. Create a folder for your new wordpress project\n`mkdir my-wp-project \u0026\u0026 cd my-wp-project`\n\n\n#### 2. Copy source files from this repo\n`git clone --branch=master https://github.com/creative-workflow/wordpress-docker.git . \u0026\u0026 rm -rf ./.git*`\n\n\n#### 3. Download a fresh wordpress copy and copy our specific wp-config.php\n`./scripts/init-wordpress.sh`\nNote: *For this script you need to have [curl](https://curl.haxx.se/) installed.*\nNote: *You can copy your own wordpress source code to a folder named 'wordpress' inside of your 'my-wp-project' folder*\n\n#### 4. Setup and run the web, db and php container\n`./scripts/run.sh`\n\nNote: *At the beginning an info will be printed containing the ip where you can access your wordpress installation. E.g.*\n\n```\n -\u003e starting wordpress web container on: 0.0.0.0:9999\n -\u003e starting phpmyadmin container on: 0.0.0.0:9001\n -\u003e if you want to use browsersync or gulp open another terminal\n -\u003e !db container needs a few minutes first time to setup db\n more info: https://github.com/creative-workflow/wordpress-docker\n```\n\nIf you **don't want to use browser-sync** follow the wordpress [setup guide](https://codex.wordpress.org/Installing_WordPress#Step_5:_Run_the_Install_Script) inside of your browser and ignore the following steps.\n\nNote: *Sometimes the wordpress setup gets a timeout, but a reload shows the correct installation.*\n\nNote: *In the terminal where you started the docker machine you can see the requests sent from your browser.*\n\nNote: *With Ctrl+C you can stop the docker container in the terminal.*\n\n\n#### 5. If you want to use browser-sync\nOpen a new terminal inside your project folder and run:\n\n```\nnpm install -g gulp gulp-cli yarn coffee-script\nyarn install\n```\n\nNote: *If you have access errors prepend the commands with `sudo`.*\n\nNow you can start browser-sync by typing `gulp serve`. This will open your standard browser with your wordpress page.\n\nFollow the wordpress setup guide.\n\nNote: *With Ctrl+C you can stop browser-sync in the terminal.*\n\n##### Using browser-sync\n\nIf you edit e.g. the style.css in `my-wp-project/wordpress/wp-content/themes/twentysixteen` your browser refreshes automatically.\n\nThe browser-sync user interface is accessible via `localhost:3002`.\n\n##### Change the watched wordpress theme\n\nIf you want to watch another or your own custom wordpress theme, change the settings in `my-wp-project/gulp/config.yml` and restart with `gulp serve`.\n\n\n## Manage database\nYou can share a database dump within your repo, so you can sync development with your team mates. *(remember step 3.1)*\n#### export your database to ./data/db/dump.sql\n`./scripts/db-export.sh`\n\n#### import data from ./data/db/dump.sql\n`./scripts/db-import.sh`\n\n#### using phpmyadmin\nOpen http://localhost:9001 web browser. Login in with:. Login in with:\n  * host: *leave blank*\n  * user: root\n  * password: *leave blank*\n\n## Manage container\n#### start web, db, php and phpmyadmin container\n`./scripts/run.sh`\n\nNote: *At the first line ip and port for web container access will be printed.*\n\n#### login to a container\n`docker-compose run web bash`\n\nNote: *web, db, php and phpmyadmin are available.*\n\n#### container log files\n`docker-compose logs web`\n\nNote: *web, db, php and phpmyadmin are available.*\n\n\n\n#### delete all containers\nAttention: your database will be removed, ensure you dumped it(see above).\n\n`docker-compose stop \u0026\u0026 docker-compose rm`\n\n\n## Livereload, Browsersync, Sass and Coffee\nReloads your browser on code changes and compiles sass to css and coffee to javascript. [Read more](https://www.browsersync.io/).\n\nIt has to run on your local machine because of filesystem event issues.\n\n#### adding and running gulp tasks\nYou can add your custom gulp tasks to the files in the folder `./gulp/*`.\n\nRead more about [gulp](https://github.com/gulpjs/gulp/blob/master/docs/API.md).\n\n\n## TODOs\n  * add batch scripts for window users\n  * add instruction for cw-basic-theme, sass and coffee\n  * integrate https://github.com/easy-website-generator/easy-website-generator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreative-workflow%2Fwordpress-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreative-workflow%2Fwordpress-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreative-workflow%2Fwordpress-docker/lists"}