WordPress, Git, and Submodule: Installing wordpress locally using submodule and deploying to production server.

LOCAL SETUP mkdir ~/local-wp && cd local-wp touch readme.md git add readme.md git commit -m ‘init commit’ touch .gitignore Add following lines to `.gitignore`, personally I prefer ignoring `wp-config.php` as it contains sensitive info and database credentials: # OSX files .DS_Store # intellij project settings .idea/ wp-config.php We are using wordpress github repo as a…

Post-commit: simple automated deployment locally using git hook

Let’s grasp the idea how git hooks work # SETTING UP A REPO $: mkdir ~/workspace/simple-hook && cd simple-hook $: git init Initialized empty Git repository in /home/workspace/simple-hook/.git/ $: ls .git HEAD config description hooks info objects refs We are interested about hooks directory. That’s where all the magic happens. Let’s see content of the…